Source-Changes-HG archive

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

[xsrc/xorg]: xsrc/external/mit/xf86-video-amdgpu/dist initial import of xf86-...



details:   https://anonhg.NetBSD.org/xsrc/rev/61df5536a3b7
branches:  xorg
changeset: 10287:61df5536a3b7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Jun 01 06:38:18 2019 +0000

description:
initial import of xf86-video-amdgpu-19.0.1

diffstat:

 external/mit/xf86-video-amdgpu/dist/ChangeLog             |  20 +++++
 external/mit/xf86-video-amdgpu/dist/configure             |  20 ++--
 external/mit/xf86-video-amdgpu/dist/configure.ac          |   2 +-
 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.c |  54 ++++++++++++++-
 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h |   3 +
 5 files changed, 86 insertions(+), 13 deletions(-)

diffs (215 lines):

diff -r 983a97e93960 -r 61df5536a3b7 external/mit/xf86-video-amdgpu/dist/ChangeLog
--- a/external/mit/xf86-video-amdgpu/dist/ChangeLog     Wed Mar 20 06:34:02 2019 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/ChangeLog     Sat Jun 01 06:38:18 2019 +0000
@@ -1,3 +1,23 @@
+commit bd4ffd4ebbdf1c43ab9e1ef9ba8b812fd2dde4a4
+Author: Michel Dänzer <michel.daenzer%amd.com@localhost>
+Date:   Tue Mar 19 18:44:31 2019 +0100
+
+    Bump version for the 19.0.1 release
+
+commit 6ee857726166f495abcd68e4ff60e3a09593d079
+Author: Dave Airlie <airlied%redhat.com@localhost>
+Date:   Mon Mar 23 11:33:23 2015 +1000
+
+    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)
+    Reviewed-by: Alex Deucher <alexander.deucher%amd.com@localhost>
+
 commit 9534bf3bb33d14cd3a5af08e36ef42b309647fc7
 Author: Michel Dänzer <michel.daenzer%amd.com@localhost>
 Date:   Wed Mar 6 12:05:14 2019 +0100
diff -r 983a97e93960 -r 61df5536a3b7 external/mit/xf86-video-amdgpu/dist/configure
--- a/external/mit/xf86-video-amdgpu/dist/configure     Wed Mar 20 06:34:02 2019 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/configure     Sat Jun 01 06:38:18 2019 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xf86-video-amdgpu 19.0.0.
+# Generated by GNU Autoconf 2.69 for xf86-video-amdgpu 19.0.1.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='xf86-video-amdgpu'
 PACKAGE_TARNAME='xf86-video-amdgpu'
-PACKAGE_VERSION='19.0.0'
-PACKAGE_STRING='xf86-video-amdgpu 19.0.0'
+PACKAGE_VERSION='19.0.1'
+PACKAGE_STRING='xf86-video-amdgpu 19.0.1'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu'
 PACKAGE_URL=''
 
@@ -1404,7 +1404,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xf86-video-amdgpu 19.0.0 to adapt to many kinds of systems.
+\`configure' configures xf86-video-amdgpu 19.0.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1476,7 +1476,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xf86-video-amdgpu 19.0.0:";;
+     short | recursive ) echo "Configuration of xf86-video-amdgpu 19.0.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1635,7 +1635,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xf86-video-amdgpu configure 19.0.0
+xf86-video-amdgpu configure 19.0.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2050,7 +2050,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xf86-video-amdgpu $as_me 19.0.0, which was
+It was created by xf86-video-amdgpu $as_me 19.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2921,7 +2921,7 @@
 
 # Define the identity of the package.
  PACKAGE='xf86-video-amdgpu'
- VERSION='19.0.0'
+ VERSION='19.0.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20619,7 +20619,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xf86-video-amdgpu $as_me 19.0.0, which was
+This file was extended by xf86-video-amdgpu $as_me 19.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20685,7 +20685,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xf86-video-amdgpu config.status 19.0.0
+xf86-video-amdgpu config.status 19.0.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r 983a97e93960 -r 61df5536a3b7 external/mit/xf86-video-amdgpu/dist/configure.ac
--- a/external/mit/xf86-video-amdgpu/dist/configure.ac  Wed Mar 20 06:34:02 2019 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/configure.ac  Sat Jun 01 06:38:18 2019 +0000
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-amdgpu],
-        [19.0.0],
+        [19.0.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu],
         [xf86-video-amdgpu])
 
diff -r 983a97e93960 -r 61df5536a3b7 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.c
--- a/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.c Wed Mar 20 06:34:02 2019 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.c Sat Jun 01 06:38:18 2019 +0000
@@ -2142,6 +2142,51 @@
        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;
+       AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(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(pAMDGPUEnt->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(pAMDGPUEnt->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)
@@ -2213,6 +2258,8 @@
        }
        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));
@@ -2230,8 +2277,11 @@
        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);
diff -r 983a97e93960 -r 61df5536a3b7 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h
--- a/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h Wed Mar 20 06:34:02 2019 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/src/drmmode_display.h Sat Jun 01 06:38:18 2019 +0000
@@ -163,6 +163,9 @@
        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;



Home | Main Index | Thread Index | Old Index