xserver patch - Fix xf86CrtcSetModeTransform() to not skip transform processing with KMS
Defnet, Benjamin R
benjamin.r.defnet at intel.com
Tue May 19 16:40:39 PDT 2009
Hi Daniel,
Would the following patch be more acceptable to you. This patch will just store off the rotation and transform in the crtc without actually applying it to the transformation matrices. This will allow the xserver driver to do whatever they want with these transforms. The rotation parameter to set_major_mode is redundant at this point but I didn't want to change the function signature.
Ben
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 1c2ee49..2d954b7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -255,9 +255,6 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
RRTransformRec saved_transform;
Bool saved_transform_present;
- if (crtc->funcs->set_mode_major)
- return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
-
crtc->enabled = xf86CrtcInUse (crtc);
if (!crtc->enabled)
@@ -306,6 +303,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
goto done;
}
+ if (crtc->funcs->set_mode_major) {
+ ret = crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
+ goto done;
+ }
+
/* Pass our mode to the outputs and the CRTC to give them a chance to
* adjust it according to limitations or output properties, and also
* a chance to reject the mode entirely.
-----Original Message-----
From: Daniel Stone [mailto:daniel at fooishbar.org]
Sent: Wednesday, May 13, 2009 11:07 AM
To: Defnet, Benjamin R
Cc: xorg-devel at lists.freedesktop.org; Barnes, Jesse; Packard, Keith
Subject: Re: xserver patch - Fix xf86CrtcSetModeTransform() to not skip transform processing with KMS
On Wed, May 13, 2009 at 10:55:35AM -0700, Defnet, Benjamin R wrote:
> About this "forcing all rendering to be transformed, even if you can do rotation in hardware"...isnt' this exactly what happens in the case where we don't use set_mode_major? Why have differing expectations between the two?
Sure, but that's completely fixable without breaking server <-> driver
API, and I have a patchset to do so that I'll post in a week or so.
Cheers,
Daniel
More information about the xorg-devel
mailing list