<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - intel xorg driver does not support DRI2DriverVDPAU name"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=73507">73507</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>intel xorg driver does not support DRI2DriverVDPAU name
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ibragimovrinat@mail.ru
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/intel
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Since 2010, DRI2 supports multiple driver names. That was added to ease
selection of appropriate driver by libvdpau. As for today, intel driver
support only DRI2DriverDRI (== 0), but not DRI2DriverVDPAU (== 1).

Although there is no any hardware-specific VDPAU driver for intel video
adapters at the moment, it would be easier to use generic drivers like
libvdpau-va-gl by creating symlink named libvdpau_i965.so.1. That way
appropriate driver will be selected in run time automatically:
libvdpau_i965.so.1 on i965 equipped machines, and libvdpau_nvidia.so.1 on
nvidia equipped ones.

Signed-off-by: Rinat <<a href="mailto:ibragimovrinat@mail.ru">ibragimovrinat@mail.ru</a>>
---
 src/sna/sna_dri.c   | 5 +++--
 src/uxa/intel_dri.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index fedf263..ba705ec 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -2463,7 +2463,7 @@ bool sna_dri_open(struct sna *sna, ScreenPtr screen)
     DRI2InfoRec info;
     int major = 1, minor = 0;
 #if DRI2INFOREC_VERSION >= 4
-    const char *driverNames[1];
+    const char *driverNames[2];
 #endif

     DBG(("%s()\n", __FUNCTION__));
@@ -2507,9 +2507,10 @@ bool sna_dri_open(struct sna *sna, ScreenPtr screen)
     info.ScheduleSwap = sna_dri_schedule_swap;
     info.GetMSC = sna_dri_get_msc;
     info.ScheduleWaitMSC = sna_dri_schedule_wait_msc;
-    info.numDrivers = 1;
+    info.numDrivers = 2;
     info.driverNames = driverNames;
     driverNames[0] = info.driverName;
+    driverNames[1] = info.driverName;
 #endif

 #if DRI2INFOREC_VERSION >= 6
diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c
index 1d7efab..ca58052 100644
--- a/src/uxa/intel_dri.c
+++ b/src/uxa/intel_dri.c
@@ -1567,7 +1567,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
     int dri2scr_major = 1;
     int dri2scr_minor = 0;
 #if DRI2INFOREC_VERSION >= 4
-    const char *driverNames[1];
+    const char *driverNames[2];
 #endif

     if (intel->force_fallback) {
@@ -1634,9 +1634,10 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
     info.ScheduleSwap = I830DRI2ScheduleSwap;
     info.GetMSC = I830DRI2GetMSC;
     info.ScheduleWaitMSC = I830DRI2ScheduleWaitMSC;
-    info.numDrivers = 1;
+    info.numDrivers = 2;
     info.driverNames = driverNames;
     driverNames[0] = info.driverName;
+    driverNames[1] = info.driverName;
 #endif

     return DRI2ScreenInit(screen, &info);
-- 
1.8.5.2</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>