Weston rotation don't work with toradex 5.2.0

Hello,

I am not able to rotate weston with the new 5.2.0 image ( kernel 5.4.91 ) , Weston stops and I have a message “invalid transform 90 for output DPI-1” in weston.log

If I put transform=0/90/180/270 it don’t work. If I comment the line, then weston starts.

With the previous version I generated , 5.1.0 , in january, I was able to rotate weston with transform=XX

Is there something changed ?

I see that the kernel version has changed, and device tree for display had a big change, I had to rewrite my kernel patch to force the display mode :
linux-toradex changed from linux-toradex_5.4-2.1.x.bbappend to linux-toradex_5.4-2.3.x.bbappend

and the patch was initially :

--- a/arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dtsi	2021-01-13 16:44:26.866528434 +0100
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dtsi	2021-01-13 16:45:49.661605788 +0100
@@ -29,17 +29,17 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 * logictechno,lt161010-2nhc: Cap. Touch Display 7" Parallel
 		 * logictechno,lt161010-2nhr: Res. Touch Display 7" Paralle
 		 * logictechno,lt170410-2whc: Cap. Touch Display 10.1" LVDS
 		 * tpk,f07a-0102: Capacitive Multi-Touch Display Fusion 7"
 		 * tpk,f10a-0102: Capacitive Multi-Touch Display Fusion 10"
 		 */
-		compatible = "panel-dpi";
+		compatible = "ortustech,com43h4m85ulc";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 
 		width-mm = <217>;
 		height-mm = <136>;
 
 		data-mapping = "bgr666";
 		status = "disabled";

and changed by :

--- a/arch/arm64/boot/dts/freescale/imx8qxp-colibri.dtsi	2021-03-03 09:34:02.725877833 +0100
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-colibri.dtsi	2021-03-03 09:34:35.386099915 +0100
@@ -64,7 +64,7 @@
 	};
 
 	panel_dpi: panel-dpi {
-		compatible = "panel-dpi";
+		compatible = "ortustech,com43h4m85ulc";
 		backlight = <&backlight>;
 		data-mapping = "bgr666";
 		power-supply = <&reg_module_3v3>;

This is the only modification I have done. You can see that the file where is declared “panel-dpi” has changed.

Any idea ?

Regards,

I have just tried my old image ( build in january ) and it works well. If I put transform=90, the rotation works well

Here is /var/log/westion.log : weston.log 5.1.0 rotation succeed 20210325 - Pastebin.com

with the build 5.1.0 we have

  • kernel version : 5.4.77-5.1.0-devel+git.a2f08dfd79ae
  • weston version : 8.0.0-34-g27cde525+

with the build 5.2.0 we have

  • kernel version : 5.4.91-5.2.0-devel+git.c59b3c2da1e9
  • weston version : 9.0.0-34-ga1823f20+

Maybe the issue comes from here ? Or maybe with weston 9, we must use another way to rotate wayland/weston ?

Hello,

Any help about this ? It don’t work with the reference multimedia image 5.2.0 / kernel 5.4.91 / weston 9.

Do I have to revert the repository and work only with 5.1.0 ?

Hello all,

Finally, I have found why the rotation don’t work with weston 9.0 toradex 5.2.0 etc…

this is not documented ( or not well ). I worked with weston source

in weston branch 8.0 file compositor/main.c :

we have :

static const struct { const char *name; uint32_t token; } transforms[] = {
	{ "normal",     WL_OUTPUT_TRANSFORM_NORMAL },
	{ "90",         WL_OUTPUT_TRANSFORM_90 },
	{ "180",        WL_OUTPUT_TRANSFORM_180 },
	{ "270",        WL_OUTPUT_TRANSFORM_270 },
	{ "flipped",    WL_OUTPUT_TRANSFORM_FLIPPED },
	{ "flipped-90", WL_OUTPUT_TRANSFORM_FLIPPED_90 },
	{ "flipped-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 },
	{ "flipped-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 },
};

in the same file in branch 9.0 we have :

static const struct { const char *name; uint32_t token; } transforms[] = {
	{ "normal",             WL_OUTPUT_TRANSFORM_NORMAL },
	{ "rotate-90",          WL_OUTPUT_TRANSFORM_90 },
	{ "rotate-180",         WL_OUTPUT_TRANSFORM_180 },
	{ "rotate-270",         WL_OUTPUT_TRANSFORM_270 },
	{ "flipped",            WL_OUTPUT_TRANSFORM_FLIPPED },
	{ "flipped-rotate-90",  WL_OUTPUT_TRANSFORM_FLIPPED_90 },
	{ "flipped-rotate-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 },
	{ "flipped-rotate-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 },
};

And I checked the source inside yocto build ( :/media/disk1/build_yocto/kts5/build/tmp/work/colibri_imx8x-tdx-linux/pga-kts5-colibri/1.0-r0/sdk/image/opt/tdx-xwayland/5.2.0/sysroots/aarch64-tdx-linux/usr/src/debug/weston/9.0.0.imx-r0/git/compositor/main.c ) it is the same.

So , I have to set transform=rotate-90 instead transform=90 to correct the issue.

The /etc/xdg/weston/weston.ini let the old syntax ( < 9.0 ) , this make confusion.

Hi @f.mazur,

Sorry for the delay in answering you.

Last two weeks we were holding a lot of activities that impacted our support.

I’m glad to see that you managed to solve the issue, and I’m forwarding it to Technical Marketing so we document this accordingly.

I appreciate the fact that you provided very detailed feedback about the resolution.

Best regards,
André Curvello

@f.mazur : Thank you so much. I have exact the same error and your solution works perfect.
@ Toradex please document this.

Best regards and THANKS A LOT

Hi!

It’s really a problem when something changes from one version to another. Toradex integrates Weston and other several applications/packages, so it’s hard to document and keep track of changes for every package.

For the Weston example, like in this article, we point to a Weston documentation, which seems to be updated.

But, nevertheless, we appreciate the investigation @f.mazur did and posted here, so other people could benefit from it. Thanks! :slight_smile:

Best regards