mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
Merge 71caac0803 into a8192aa709
This commit is contained in:
commit
f9e6b377c9
2 changed files with 56 additions and 13 deletions
|
|
@ -41,6 +41,7 @@
|
|||
#include "os/mathx_priv.h"
|
||||
#include "Xext/present/present_priv.h"
|
||||
|
||||
#include "extinit.h"
|
||||
#include "inputstr.h"
|
||||
#include "xf86str.h"
|
||||
#include "X11/Xatom.h"
|
||||
|
|
@ -1030,7 +1031,13 @@ static Bool
|
|||
drmmode_SharedPixmapPresent(PixmapPtr ppix, xf86CrtcPtr crtc,
|
||||
drmmode_ptr drmmode)
|
||||
{
|
||||
ScreenPtr primary = crtc->randr_crtc->pScreen->current_primary;
|
||||
ScreenPtr primary;
|
||||
|
||||
if (!crtc->randr_crtc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
primary = crtc->randr_crtc->pScreen->current_primary;
|
||||
|
||||
if (primary->PresentSharedPixmap(ppix)) {
|
||||
/* Success, queue flip to back target */
|
||||
|
|
@ -2161,6 +2168,9 @@ drmmode_set_target_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix,
|
|||
|
||||
ppriv = msGetPixmapPriv(drmmode, ppix);
|
||||
if (!ppriv->secondary_damage) {
|
||||
if (!crtc->randr_crtc) {
|
||||
return FALSE;
|
||||
}
|
||||
ppriv->secondary_damage = DamageCreate(NULL, NULL,
|
||||
DamageReportNone,
|
||||
TRUE,
|
||||
|
|
@ -4596,7 +4606,12 @@ out_free_res:
|
|||
|
||||
drmModeFreeResources(mode_res);
|
||||
out:
|
||||
RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
|
||||
#ifdef XINERAMA
|
||||
if (noPanoramiXExtension)
|
||||
#endif
|
||||
{
|
||||
RRGetInfo(xf86ScrnToScreen(scrn), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#undef DRM_MODE_LINK_STATUS_BAD
|
||||
|
|
|
|||
|
|
@ -224,13 +224,21 @@ static Bool
|
|||
ms_get_kernel_ust_msc(xf86CrtcPtr crtc,
|
||||
uint64_t *msc, uint64_t *ust)
|
||||
{
|
||||
ScreenPtr screen = crtc->randr_crtc->pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
modesettingPtr ms = modesettingPTR(scrn);
|
||||
ScreenPtr screen;
|
||||
ScrnInfoPtr scrn;
|
||||
modesettingPtr ms;
|
||||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
drmVBlank vbl;
|
||||
int ret;
|
||||
|
||||
if (!crtc->randr_crtc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
screen = crtc->randr_crtc->pScreen;
|
||||
scrn = xf86ScreenToScrn(screen);
|
||||
ms = modesettingPTR(scrn);
|
||||
|
||||
if (ms->has_queue_sequence || !ms->tried_queue_sequence) {
|
||||
uint64_t ns;
|
||||
ms->tried_queue_sequence = TRUE;
|
||||
|
|
@ -310,13 +318,21 @@ ms_queue_vblank_internal(xf86CrtcPtr crtc, ms_queue_flag flags,
|
|||
uint64_t msc, uint64_t *msc_queued, uint32_t seq,
|
||||
Bool abort_on_fail)
|
||||
{
|
||||
ScreenPtr screen = crtc->randr_crtc->pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
modesettingPtr ms = modesettingPTR(scrn);
|
||||
ScreenPtr screen;
|
||||
ScrnInfoPtr scrn;
|
||||
modesettingPtr ms;
|
||||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
drmVBlank vbl;
|
||||
int ret;
|
||||
|
||||
if (!crtc->randr_crtc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
screen = crtc->randr_crtc->pScreen;
|
||||
scrn = xf86ScreenToScrn(screen);
|
||||
ms = modesettingPTR(scrn);
|
||||
|
||||
/* Try coalescing this event into another to avoid event queue exhaustion */
|
||||
if (flags == MS_QUEUE_ABSOLUTE && ms_queue_coalesce(crtc, seq, msc))
|
||||
return TRUE;
|
||||
|
|
@ -431,11 +447,19 @@ ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint64_t sequence, Bool is64bit)
|
|||
int
|
||||
ms_get_crtc_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc)
|
||||
{
|
||||
ScreenPtr screen = crtc->randr_crtc->pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
modesettingPtr ms = modesettingPTR(scrn);
|
||||
ScreenPtr screen;
|
||||
ScrnInfoPtr scrn;
|
||||
modesettingPtr ms;
|
||||
uint64_t kernel_msc;
|
||||
|
||||
if (!crtc->randr_crtc) {
|
||||
return BadImplementation;
|
||||
}
|
||||
|
||||
screen = crtc->randr_crtc->pScreen;
|
||||
scrn = xf86ScreenToScrn(screen);
|
||||
ms = modesettingPTR(scrn);
|
||||
|
||||
if (!ms_get_kernel_ust_msc(crtc, &kernel_msc, ust))
|
||||
return BadMatch;
|
||||
*msc = ms_kernel_msc_to_crtc_msc(crtc, kernel_msc, ms->has_queue_sequence);
|
||||
|
|
@ -469,10 +493,14 @@ ms_drm_queue_alloc(xf86CrtcPtr crtc,
|
|||
ms_drm_handler_proc handler,
|
||||
ms_drm_abort_proc abort)
|
||||
{
|
||||
ScreenPtr screen = crtc->randr_crtc->pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
ScrnInfoPtr scrn = NULL;
|
||||
struct ms_drm_queue *q;
|
||||
|
||||
if (crtc->randr_crtc) {
|
||||
ScreenPtr screen = crtc->randr_crtc->pScreen;
|
||||
scrn = xf86ScreenToScrn(screen);
|
||||
}
|
||||
|
||||
q = calloc(1, sizeof(struct ms_drm_queue));
|
||||
|
||||
if (!q)
|
||||
|
|
|
|||
Loading…
Reference in a new issue