Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / driver / 
xserver-xorg-video-ati


Commits:
f6cd4a67 by Michel Dänzer at 2019-03-08T10:48:10Z
Revert "glamor: Avoid glamor_create_pixmap for pixmaps backing 
windows"

This reverts commit 274703087f80342f51fa69c935bb9a1cb0c4ae47.

Reports of visual corruption were bisected to this, e.g.
https://bugs.archlinux.org/task/61941 . I can reproduce this with Turks,
but not with Bonaire. I assume it's a Mesa/glamor bug, but let's revert
for now.

Acked-by: Alex Deucher <alexander.deuc...@amd.com>

- - - - -
79bc0e05 by Michel Dänzer at 2019-03-14T10:10:51Z
Use radeon_finish in drmmode_crtc_scanout_update

radeon_glamor_finish only works if we're using glamor, otherwise it'll
crash.

Fixes: ce7db51020d3 "Cancel pending scanout update in 
drmmode_crtc_scanout_update"
Bug: https://bugs.debian.org/924540
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>

- - - - -
4407c78b by Dave Airlie at 2019-03-15T11:42:04Z
modesetting: add tile property support

This adds tiling support to the driver, it retrieves the tile info from
the kernel and translates it into the server format and exposes the
property.

(Ported from xserver commits 8fb8bbb3062f1a06621ab7030a9e89d5e8367b35
 and 6abdb54a11dac4e8854ff94ecdcb90a14321ab31)
(Ported from amdgpu commit 6ee857726166f495abcd68e4ff60e3a09593d079)
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>

- - - - -
36703f66 by Michel Dänzer at 2019-03-19T17:01:02Z
Bump version for 19.0.1 release

- - - - -


4 changed files:

- configure.ac
- src/drmmode_display.c
- src/drmmode_display.h
- src/radeon_glamor.c


Changes:

=====================================
configure.ac
=====================================
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-ati],
-        [19.0.0],
+        [19.0.1],
         
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon],
         [xf86-video-ati])
 


=====================================
src/drmmode_display.c
=====================================
@@ -785,7 +785,7 @@ drmmode_crtc_scanout_update(xf86CrtcPtr crtc, 
DisplayModePtr mode,
                                             
screen->GetWindowPixmap(screen->root),
                                             extents)) {
                        RegionEmpty(DamageRegion(drmmode_crtc->scanout_damage));
-                       radeon_glamor_finish(scrn);
+                       radeon_finish(scrn, 
drmmode_crtc->scanout[scanout_id].bo);
 
                        if (!drmmode_crtc->flip_pending) {
                                radeon_drm_abort_entry(drmmode_crtc->
@@ -1576,6 +1576,51 @@ drmmode_output_mode_valid(xf86OutputPtr output, 
DisplayModePtr pModes)
        return MODE_OK;
 }
 
+static void
+drmmode_output_attach_tile(xf86OutputPtr output)
+{
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
+       drmmode_output_private_ptr drmmode_output = output->driver_private;
+       drmModeConnectorPtr koutput = drmmode_output->mode_output;
+       RADEONEntPtr pRADEONEnt = RADEONEntPriv(output->scrn);
+       struct xf86CrtcTileInfo tile_info, *set = NULL;
+       int i;
+
+       if (!koutput) {
+               xf86OutputSetTile(output, NULL);
+               return;
+       }
+
+       /* look for a TILE property */
+       for (i = 0; i < koutput->count_props; i++) {
+               drmModePropertyPtr props;
+               props = drmModeGetProperty(pRADEONEnt->fd, koutput->props[i]);
+               if (!props)
+                       continue;
+
+               if (!(props->flags & DRM_MODE_PROP_BLOB)) {
+                       drmModeFreeProperty(props);
+                       continue;
+               }
+
+               if (!strcmp(props->name, "TILE")) {
+                       drmModeFreePropertyBlob(drmmode_output->tile_blob);
+                       drmmode_output->tile_blob =
+                               drmModeGetPropertyBlob(pRADEONEnt->fd,
+                                                      koutput->prop_values[i]);
+               }
+               drmModeFreeProperty(props);
+       }
+       if (drmmode_output->tile_blob) {
+               if (xf86OutputParseKMSTile(drmmode_output->tile_blob->data,
+                                          drmmode_output->tile_blob->length,
+                                          &tile_info) == TRUE)
+                       set = &tile_info;
+       }
+       xf86OutputSetTile(output, set);
+#endif
+}
+
 static int
 koutput_get_prop_idx(int fd, drmModeConnectorPtr koutput,
         int type, const char *name)
@@ -1648,6 +1693,8 @@ drmmode_output_get_modes(xf86OutputPtr output)
        }
        xf86OutputSetEDID(output, mon);
 
+       drmmode_output_attach_tile(output);
+
        /* modes should already be available */
        for (i = 0; i < koutput->count_modes; i++) {
                Mode = xnfalloc(sizeof(DisplayModeRec));
@@ -1665,8 +1712,11 @@ drmmode_output_destroy(xf86OutputPtr output)
        drmmode_output_private_ptr drmmode_output = output->driver_private;
        int i;
 
-       if (drmmode_output->edid_blob)
-               drmModeFreePropertyBlob(drmmode_output->edid_blob);
+       drmModeFreePropertyBlob(drmmode_output->edid_blob);
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
+       drmModeFreePropertyBlob(drmmode_output->tile_blob);
+#endif
+
        for (i = 0; i < drmmode_output->num_props; i++) {
                drmModeFreeProperty(drmmode_output->props[i].mode_prop);
                free(drmmode_output->props[i].atoms);


=====================================
src/drmmode_display.h
=====================================
@@ -142,6 +142,9 @@ typedef struct {
     drmModeConnectorPtr mode_output;
     drmModeEncoderPtr *mode_encoders;
     drmModePropertyBlobPtr edid_blob;
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 17, 99, 901, 0)
+    drmModePropertyBlobPtr tile_blob;
+#endif
     int dpms_enum_id;
     int num_props;
     drmmode_prop_ptr props;


=====================================
src/radeon_glamor.c
=====================================
@@ -238,7 +238,7 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, 
int depth,
                if (info->shadow_primary) {
                        if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP)
                                return fbCreatePixmap(screen, w, h, depth, 
usage);
-               } else if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
+               } else {
                        pixmap = glamor_create_pixmap(screen, w, h, depth, 
usage);
                        if (pixmap)
                            return pixmap;



View it on GitLab: 
https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-ati/compare/0d132d99e0b750896a78f47d73a8639680495d8c...36703f66c3b06875651606a6280d5dc9d9dad51e

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-ati/compare/0d132d99e0b750896a78f47d73a8639680495d8c...36703f66c3b06875651606a6280d5dc9d9dad51e
You're receiving this email because of your account on salsa.debian.org.

Reply via email to