From: Ville Syrjälä <ville.syrj...@linux.intel.com>

Currently we're clearing DRIVER_ATOMIC in driver.driver_features
for older platforms. This will not work correctly should we ever
have a system with and old and new GPU in it. While that is not
possible currently let's make the code more correct and use
the per-device driver_features instead.

Cc: Chris Wilson <ch...@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 5dd7fc582e6f..2ddf8538cb47 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1384,14 +1384,14 @@ int i915_driver_load(struct pci_dev *pdev, const struct 
pci_device_id *ent)
        struct drm_i915_private *dev_priv;
        int ret;
 
-       /* Enable nuclear pageflip on ILK+ */
-       if (!i915_modparams.nuclear_pageflip && match_info->gen < 5)
-               driver.driver_features &= ~DRIVER_ATOMIC;
-
        dev_priv = i915_driver_create(pdev, ent);
        if (!dev_priv)
                return -ENOMEM;
 
+       /* Disable nuclear pageflip by default on pre-ILK */
+       if (!i915_modparams.nuclear_pageflip && match_info->gen < 5)
+               dev_priv->drm.driver_features &= ~DRIVER_ATOMIC;
+
        ret = pci_enable_device(pdev);
        if (ret)
                goto out_fini;
-- 
2.16.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to