mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 09:34:33 +00:00
Remove drmmode_crtc_private_rec::present_vblank_* related code
Not needed anymore with the more robust mechanisms for preventing nested drmHandleEvent calls introduced in the previous changes. Acked-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
e52872da69
commit
85cd8eef0c
@@ -436,15 +436,6 @@ amdgpu_scanout_flip_handler(xf86CrtcPtr crtc, uint32_t msc, uint64_t usec,
|
||||
drmmode_fb_reference(pAMDGPUEnt->fd, &drmmode_crtc->fb,
|
||||
drmmode_crtc->flip_pending);
|
||||
amdgpu_scanout_flip_abort(crtc, event_data);
|
||||
|
||||
#ifdef HAVE_PRESENT_H
|
||||
if (drmmode_crtc->present_vblank_event_id) {
|
||||
present_event_notify(drmmode_crtc->present_vblank_event_id,
|
||||
drmmode_crtc->present_vblank_usec,
|
||||
drmmode_crtc->present_vblank_msc);
|
||||
drmmode_crtc->present_vblank_event_id = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ static present_screen_info_rec amdgpu_present_screen_info;
|
||||
|
||||
struct amdgpu_present_vblank_event {
|
||||
uint64_t event_id;
|
||||
Bool vblank_for_flip;
|
||||
Bool unflip;
|
||||
};
|
||||
|
||||
@@ -120,26 +119,9 @@ static void
|
||||
amdgpu_present_vblank_handler(xf86CrtcPtr crtc, unsigned int msc,
|
||||
uint64_t usec, void *data)
|
||||
{
|
||||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
struct amdgpu_present_vblank_event *event = data;
|
||||
|
||||
if (event->vblank_for_flip &&
|
||||
drmmode_crtc->tear_free &&
|
||||
drmmode_crtc->scanout_update_pending) {
|
||||
if (drmmode_crtc->present_vblank_event_id != 0) {
|
||||
xf86DrvMsg(crtc->scrn->scrnIndex, X_WARNING,
|
||||
"Need to handle previously deferred vblank event\n");
|
||||
present_event_notify(drmmode_crtc->present_vblank_event_id,
|
||||
drmmode_crtc->present_vblank_usec,
|
||||
drmmode_crtc->present_vblank_msc);
|
||||
}
|
||||
|
||||
drmmode_crtc->present_vblank_event_id = event->event_id;
|
||||
drmmode_crtc->present_vblank_msc = msc;
|
||||
drmmode_crtc->present_vblank_usec = usec;
|
||||
} else
|
||||
present_event_notify(event->event_id, usec, msc);
|
||||
|
||||
present_event_notify(event->event_id, usec, msc);
|
||||
free(event);
|
||||
}
|
||||
|
||||
@@ -162,7 +144,6 @@ static int
|
||||
amdgpu_present_queue_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc)
|
||||
{
|
||||
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
|
||||
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;
|
||||
ScreenPtr screen = crtc->pScreen;
|
||||
struct amdgpu_present_vblank_event *event;
|
||||
uintptr_t drm_queue_seq;
|
||||
@@ -171,8 +152,6 @@ amdgpu_present_queue_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc)
|
||||
if (!event)
|
||||
return BadAlloc;
|
||||
event->event_id = event_id;
|
||||
event->vblank_for_flip = drmmode_crtc->present_flip_expected;
|
||||
drmmode_crtc->present_flip_expected = FALSE;
|
||||
|
||||
drm_queue_seq = amdgpu_drm_queue_alloc(xf86_crtc,
|
||||
AMDGPU_DRM_QUEUE_CLIENT_DEFAULT,
|
||||
@@ -257,7 +236,6 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
Bool sync_flip)
|
||||
{
|
||||
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
|
||||
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
ScrnInfoPtr scrn = xf86_crtc->scrn;
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
@@ -265,8 +243,6 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
int num_crtcs_on;
|
||||
int i;
|
||||
|
||||
drmmode_crtc->present_flip_expected = FALSE;
|
||||
|
||||
if (!scrn->vtSema)
|
||||
return FALSE;
|
||||
|
||||
@@ -296,7 +272,6 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
if (num_crtcs_on == 0)
|
||||
return FALSE;
|
||||
|
||||
drmmode_crtc->present_flip_expected = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -337,7 +312,6 @@ amdgpu_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc,
|
||||
PixmapPtr pixmap, Bool sync_flip)
|
||||
{
|
||||
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
|
||||
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;
|
||||
ScreenPtr screen = crtc->pScreen;
|
||||
ScrnInfoPtr scrn = xf86_crtc->scrn;
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
|
||||
@@ -345,11 +319,11 @@ amdgpu_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc,
|
||||
Bool ret = FALSE;
|
||||
|
||||
if (!amdgpu_present_check_flip(crtc, screen->root, pixmap, sync_flip))
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
event = calloc(1, sizeof(struct amdgpu_present_vblank_event));
|
||||
if (!event)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
event->event_id = event_id;
|
||||
|
||||
@@ -366,8 +340,6 @@ amdgpu_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc,
|
||||
else
|
||||
info->drmmode.present_flipping = TRUE;
|
||||
|
||||
out:
|
||||
drmmode_crtc->present_flip_expected = FALSE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,13 +128,6 @@ typedef struct {
|
||||
/* The FB currently being scanned out by this CRTC, if any */
|
||||
struct drmmode_fb *fb;
|
||||
|
||||
#ifdef HAVE_PRESENT_H
|
||||
/* Deferred processing of Present vblank event */
|
||||
uint64_t present_vblank_event_id;
|
||||
uint64_t present_vblank_usec;
|
||||
unsigned present_vblank_msc;
|
||||
Bool present_flip_expected;
|
||||
#endif
|
||||
struct drm_color_lut *degamma_lut;
|
||||
struct drm_color_ctm *ctm;
|
||||
struct drm_color_lut *gamma_lut;
|
||||
|
||||
Reference in New Issue
Block a user