[PATCH] xfree86/modes: Allow the driver to specify initial rotation

ville.syrjala at nokia.com ville.syrjala at nokia.com
Mon Jun 28 13:26:48 PDT 2010


From: Ville Syrjälä <ville.syrjala at nokia.com>

When the "Rotate" option isn't specified allow the driver to specify
the initial rotation mode. This way the driver can choose to retain
the same settings that were used by software that was used prior to
starting X.

Signed-off-by: Ville Syrjälä <ville.syrjala at nokia.com>
---
 hw/xfree86/modes/xf86Crtc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index a62a63f..e09d941 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -572,8 +572,11 @@ xf86OutputInitialRotation (xf86OutputPtr output)
 						OPTION_ROTATE);
     int	    i;
 
-    if (!rotate_name)
+    if (!rotate_name) {
+	if (output->initial_rotation)
+	    return output->initial_rotation;
 	return RR_Rotate_0;
+    }
     
     for (i = 0; i < 4; i++)
 	if (xf86nameCompare (direction[i], rotate_name) == 0)
-- 
1.7.1



More information about the xorg-devel mailing list