Skip to contentSkip to conversation

drm/modes: Don't apply cmdline's rotation if it wasn't specified

PATCH In review Dmitry Osipenko 2 participants 5 messages Jul 11, 2019 – Jul 16, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/modes: Don't apply cmdline's rotation if it wasn't specified

The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified.

Fixes 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")
---
 drivers/gpu/drm/drm_client_modeset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_client_modeset.c +1 -1
index 56d36779d213..c8922b7cac09 100644
@@ -859,7 +859,7 @@ bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
 	 * simple XOR between the two handle the addition nicely.
 	 */
 	cmdline = &connector->cmdline_mode;
-	if (cmdline->specified) {
+	if (cmdline->specified && cmdline->rotation_reflection) {
 		unsigned int cmdline_rest, panel_rest;
 		unsigned int cmdline_rot, panel_rot;
 		unsigned int sum_rot, sum_rest;
Signature · 1 line
2.22.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dmitry Osipenko

The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified.

Fixes 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#2 lore raw

12.07.2019 22:54, Maxime Ripard пишет:

Quoted 6 lines · Dmitry Osipenko
Quoted 5 lines

The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified.

Quoted 7 lines
Quoted 2 lines
Fixes 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")

Thanks!
Maxime

Thank you. Please note that I'm not a DRM maintainer, hence either you should pick up and apply the patch by yourself or somebody else who has the commit rights will have do that. I guess Thierry could also pick up the patch into the Tegra's tree, but this patch is more DRM-generic.

#3 lore raw
Quoted 12 lines · Dmitry Osipenko

12.07.2019 22:54, Maxime Ripard пишет:

Quoted 11 lines · Dmitry Osipenko
Quoted 7 lines

The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified.

Fixes 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")
Quoted 7 lines
Quoted 2 lines

Thanks!
Maxime

Thank you. Please note that I'm not a DRM maintainer, hence either you should pick up and apply the patch by yourself or somebody else who has the commit rights will have do that. I guess Thierry could also pick up the patch into the Tegra's tree, but this patch is more DRM-generic.

Right, I've applied it now

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#4 lore raw

16.07.2019 11:42, Maxime Ripard пишет:

Quoted 16 lines · Dmitry Osipenko
Quoted 15 lines

12.07.2019 22:54, Maxime Ripard пишет:

Quoted 13 lines · Dmitry Osipenko
Quoted 7 lines

The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified.

Fixes 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")

Thanks!
Maxime

Quoted 6 lines
Quoted 4 lines

Thank you. Please note that I'm not a DRM maintainer, hence either you should pick up and apply the patch by yourself or somebody else who has the commit rights will have do that. I guess Thierry could also pick up the patch into the Tegra's tree, but this patch is more DRM-generic.

Right, I've applied it now

Thank you very much!