[Intel-gfx] [PATCH 01/16] drm/i915: use GRAPHICS_VER() instead of accessing match_info directly
Jani Nikula
jani.nikula at intel.com
Tue Jun 28 14:10:43 UTC 2022
On Thu, 23 Jun 2022, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Mon, Jun 20, 2022 at 11:37:40AM +0300, Jani Nikula wrote:
>> We've just set up device info in i915_driver_create() so we can use
>> GRAPHICS_VER() intead of looking at match_info directly.
>>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_driver.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
>> index d26dcca7e654..aeec3dfe3ebf 100644
>> --- a/drivers/gpu/drm/i915/i915_driver.c
>> +++ b/drivers/gpu/drm/i915/i915_driver.c
>> @@ -829,8 +829,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
>> */
>> int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>> {
>> - const struct intel_device_info *match_info =
>> - (struct intel_device_info *)ent->driver_data;
>> struct drm_i915_private *i915;
>> int ret;
>>
>> @@ -839,7 +837,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>> return PTR_ERR(i915);
>>
>> /* Disable nuclear pageflip by default on pre-ILK */
>> - if (!i915->params.nuclear_pageflip && match_info->graphics.ver < 5)
>> + if (!i915->params.nuclear_pageflip && GRAPHICS_VER(i915) < 5)
>
> Should also be switched to DISPLAY_VER(), but that could be done as a
> separate patch too.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Thanks, I've sent this separately with s/GRAPHICS_VER/DISPLAY_VER/.
BR,
Jani.
>
>> i915->drm.driver_features &= ~DRIVER_ATOMIC;
>>
>> ret = pci_enable_device(pdev);
>> --
>> 2.30.2
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list