Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xf86-video-amdgpu/dist/src merge xf86-video-a...



details:   https://anonhg.NetBSD.org/xsrc/rev/2c04bb3a5561
branches:  trunk
changeset: 10784:2c04bb3a5561
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Aug 23 21:20:37 2021 +0000

description:
merge xf86-video-amdgpu 21.0.0.

diffstat:

 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h |  30 +++++++-------
 1 files changed, 15 insertions(+), 15 deletions(-)

diffs (70 lines):

diff -r 65d748ea8f6d -r 2c04bb3a5561 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h
--- a/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h Mon Aug 23 21:18:52 2021 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h Mon Aug 23 21:20:37 2021 +0000
@@ -96,12 +96,6 @@
        DRMMODE_SCANOUT_VBLANK_FAILED = 1u << 1,
 };
 
-struct drmmode_scanout {
-       struct amdgpu_buffer *bo;
-       PixmapPtr pixmap;
-       int width, height;
-};
-
 typedef struct {
        drmmode_ptr drmmode;
        drmModeCrtcPtr mode_crtc;
@@ -115,8 +109,8 @@
        unsigned cursor_id;
        struct amdgpu_buffer *cursor_buffer[2];
 
-       struct drmmode_scanout rotate;
-       struct drmmode_scanout scanout[2];
+       PixmapPtr rotate;
+       PixmapPtr scanout[2];
        DamagePtr scanout_damage;
        Bool ignore_damage;
        RegionRec scanout_last_region;
@@ -202,9 +196,9 @@
 
        return crtc->enabled &&
                drmmode_crtc->dpms_mode == DPMSModeOn &&
-               !drmmode_crtc->rotate.bo &&
+               !drmmode_crtc->rotate &&
                (drmmode_crtc->tear_free ||
-                !drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo);
+                !drmmode_crtc->scanout[drmmode_crtc->scanout_id]);
 }
 
 
@@ -240,6 +234,17 @@
        drmmode_fb_reference_loc(fd, old, new, __func__, __LINE__)
 
 
+static inline void
+drmmode_crtc_scanout_destroy(PixmapPtr *scanout)
+{
+       if (!*scanout)
+               return;
+
+       (*scanout)->drawable.pScreen->DestroyPixmap(*scanout);
+       (*scanout) = NULL;
+}
+
+
 extern int drmmode_page_flip_target_absolute(AMDGPUEntPtr pAMDGPUEnt,
                                             drmmode_crtc_private_ptr drmmode_crtc,
                                             int fb_id, uint32_t flags,
@@ -259,12 +264,7 @@
 extern void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
 extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
 
-extern void drmmode_crtc_scanout_destroy(drmmode_ptr drmmode,
-                                        struct drmmode_scanout *scanout);
 void drmmode_crtc_scanout_free(xf86CrtcPtr crtc);
-PixmapPtr drmmode_crtc_scanout_create(xf86CrtcPtr crtc,
-                                     struct drmmode_scanout *scanout,
-                                     int width, int height);
 
 extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode);
 extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode);



Home | Main Index | Thread Index | Old Index