08.06.2015 5:48, Michel Dänzer пишет:
On 04.06.2015 00:11, Reverend Homer wrote:
On 02.06.2015 12:21, Michel Dänzer wrote:
From: Michel Dänzer <michel.daen...@amd.com>
In preparation for the next change, which will modify it to a static
function which needs to be in the new place. No functional change.
(Cherry picked from radeon commit
c3fa22a479e61d1899fa9d327d9c4e2a7f64b0c1)
Signed-off-by: Michel Dänzer <michel.daen...@amd.com>
---
src/amdgpu_dri2.c | 120
+++++++++++++++++++++++++++---------------------------
1 file changed, 60 insertions(+), 60 deletions(-)
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index fd98fa7..c139dec 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -497,6 +497,66 @@ xf86CrtcPtr amdgpu_dri2_drawable_crtc(DrawablePtr
pDraw, Bool consider_disabled)
return NULL;
}
+void amdgpu_dri2_flip_event_handler(unsigned int frame, unsigned
int tv_sec,
+ unsigned int tv_usec, void *event_data)
+{
+ DRI2FrameEventPtr flip = event_data;
+ DrawablePtr drawable;
+ ScreenPtr screen;
+ ScrnInfoPtr scrn;
+ int status;
+ PixmapPtr pixmap;
+
+ status = dixLookupDrawable(&drawable, flip->drawable_id,
serverClient,
+ M_ANY, DixWriteAccess);
+ if (status != Success) {
+ free(flip);
+ return;
+ }
Here
+ if (!flip->crtc) {
+ free(flip);
+ return;
+ }
and here you are doing one thing. Wouldn't be better to use
if (status != Success || !flip->crtc) {
free(flip);
return;
}
?
Thank you for the review and the suggestion. However, the purpose of
this patch is to move the function to a different location without
modifying the function itself.
Feel free to submit a patch to improve the function itself.
Thanks, but frankly speaking I am not the amd developer. I'm just
interested to learn how it works. And, sure, as an owner of AMD-based
laptop, I am interested in the best work of the drivers :)
(Is
"Reverend Homer" your real name though?)
Does it really matter? :) The point is in all mailing lists and
repositories I am "Reverend Homer" and nobody else.
--
Regards,
R.H.
_______________________________________________
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati