i965: Remove unused devinfo revision
authorBen Widawsky <benjamin.widawsky@intel.com>
Fri, 23 Oct 2015 21:38:39 +0000 (14:38 -0700)
committerBen Widawsky <benjamin.widawsky@intel.com>
Sat, 24 Oct 2015 19:48:01 +0000 (12:48 -0700)
I left the function to obtain the revision because it is, and will continue to
be useful in the future. I'd rather not have to dig it up every time we need it.
Comments left at the implementation to say as much.

This was accidentally left here when I moved the early platform support:
commit 28ed1e08e8ba98ebd4ff0b56326372f0df9c73ad
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Fri Aug 7 13:58:37 2015 -0700

    i965/skl: Remove early platform support

Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_device_info.c
src/mesa/drivers/dri/i965/brw_device_info.h
src/mesa/drivers/dri/i965/intel_screen.c

index a6a3bb670cae2e4a316a9bcc9b7e51ce26171ad1..e86b5309688be8366c29945bf2a4f28362311383 100644 (file)
@@ -359,7 +359,7 @@ static const struct brw_device_info brw_device_info_bxt = {
 };
 
 const struct brw_device_info *
-brw_get_device_info(int devid, int revision)
+brw_get_device_info(int devid)
 {
    const struct brw_device_info *devinfo;
    switch (devid) {
index 2a73e937d9f9b671097a9e9cd04ed62a644aa214..4911c233deaf5e2f1eed010ee4c85769f566d05a 100644 (file)
@@ -86,4 +86,4 @@ struct brw_device_info
    /** @} */
 };
 
-const struct brw_device_info *brw_get_device_info(int devid, int revision);
+const struct brw_device_info *brw_get_device_info(int devid);
index 590c45d93eae82634e27bb9816198b744a9a6724..fb95fb629ad9fc6d944bb369b4861a834d285990 100644 (file)
@@ -1357,7 +1357,16 @@ set_max_gl_versions(struct intel_screen *screen)
    }
 }
 
-static int
+/**
+ * Return the revision (generally the revid field of the PCI header) of the
+ * graphics device.
+ *
+ * XXX: This function is useful to keep around even if it is not currently in
+ * use. It is necessary for new platforms and revision specific workarounds or
+ * features. Please don't remove it so that we know it at least continues to
+ * build.
+ */
+static __attribute__((__unused__)) int
 brw_get_revision(int fd)
 {
    struct drm_i915_getparam gp;
@@ -1416,8 +1425,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
        return false;
 
    intelScreen->deviceID = drm_intel_bufmgr_gem_get_devid(intelScreen->bufmgr);
-   intelScreen->devinfo = brw_get_device_info(intelScreen->deviceID,
-                                              brw_get_revision(psp->fd));
+   intelScreen->devinfo = brw_get_device_info(intelScreen->deviceID);
    if (!intelScreen->devinfo)
       return false;