drm: Move struct drm_device.pdev to legacy
Subsystems (16)
Thomas Zimmermann
maintainercover drm: Move struct drm_device.pdev to legacy
The pdev field in struct drm_device points to a PCI device structure and goes back to UMS-only days when all DRM drivers where for PCI devices. Meanwhile we also support USB, SPI and platform devices. Each of those uses the generic device stored in struct drm_device.dev.
To reduce duplications and remove the special case of PCI, this patchset converts all modesetting drivers from pdev to dev and makes pdev a field for legacy UMS drivers.
For PCI devices, the pointer in struct drm_device.dev can be upcasted to struct pci_device; or tested for PCI with dev_is_pci(). In several places the code can use the dev field directly.
After converting all drivers and the DRM core, the pdev fields becomes only relevant for legacy drivers. In a later patchset, we may want to convert these as well and remove pdev entirely.
The patchset touches many files, but the individual changes are mostly trivial. I suggest to merge each driver's patch through the respective tree and later the rest through drm-misc-next.
Thomas Zimmermann (15):
drm/amdgpu: Remove references to struct drm_device.pdev drm/ast: Remove references to struct drm_device.pdev drm/bochs: Remove references to struct drm_device.pdev drm/cirrus: Remove references to struct drm_device.pdev drm/gma500: Remove references to struct drm_device.pdev drm/hibmc: Remove references to struct drm_device.pdev drm/i915: Remove references to struct drm_device.pdev drm/mgag200: Remove references to struct drm_device.pdev drm/nouveau: Remove references to struct drm_device.pdev drm/qxl: Remove references to struct drm_device.pdev drm/radeon: Remove references to struct drm_device.pdev drm/vboxvideo: Remove references to struct drm_device.pdev drm/virtgpu: Remove references to struct drm_device.pdev drm/vmwgfx: Remove references to struct drm_device.pdev
drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 +-- drivers/gpu/drm/ast/ast_drv.c | 4 +- drivers/gpu/drm/ast/ast_main.c | 25 +++--- drivers/gpu/drm/ast/ast_mm.c | 17 ++-- drivers/gpu/drm/ast/ast_mode.c | 5 +- drivers/gpu/drm/ast/ast_post.c | 8 +- drivers/gpu/drm/bochs/bochs_drv.c | 1 - drivers/gpu/drm/bochs/bochs_hw.c | 4 +- drivers/gpu/drm/drm_agpsupport.c | 9 +- drivers/gpu/drm/drm_bufs.c | 4 +- drivers/gpu/drm/drm_edid.c | 7 +- drivers/gpu/drm/drm_irq.c | 12 +-- drivers/gpu/drm/drm_pci.c | 26 +++--- drivers/gpu/drm/drm_vm.c | 2 +- drivers/gpu/drm/gma500/cdv_device.c | 30 ++++--- drivers/gpu/drm/gma500/cdv_intel_crt.c | 3 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 4 +- drivers/gpu/drm/gma500/framebuffer.c | 9 +- drivers/gpu/drm/gma500/gma_device.c | 3 +- drivers/gpu/drm/gma500/gma_display.c | 4 +- drivers/gpu/drm/gma500/gtt.c | 20 +++-- drivers/gpu/drm/gma500/intel_bios.c | 6 +- drivers/gpu/drm/gma500/intel_gmbus.c | 4 +- drivers/gpu/drm/gma500/intel_i2c.c | 2 +- drivers/gpu/drm/gma500/mdfld_device.c | 4 +- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 8 +- drivers/gpu/drm/gma500/mid_bios.c | 9 +- drivers/gpu/drm/gma500/oaktrail_device.c | 5 +- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 2 +- drivers/gpu/drm/gma500/opregion.c | 3 +- drivers/gpu/drm/gma500/power.c | 13 +-- drivers/gpu/drm/gma500/psb_drv.c | 16 ++-- drivers/gpu/drm/gma500/psb_drv.h | 8 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 6 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 36 ++++---- .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 +-- .../gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 4 +- drivers/gpu/drm/i915/display/intel_bios.c | 2 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 +-- drivers/gpu/drm/i915/display/intel_csr.c | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_opregion.c | 6 +- drivers/gpu/drm/i915/display/intel_overlay.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 4 +- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vga.c | 8 +- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 +-- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_rc6.c | 4 +- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +- drivers/gpu/drm/i915/gvt/cfg_space.c | 5 +- drivers/gpu/drm/i915/gvt/firmware.c | 10 +-- drivers/gpu/drm/i915/gvt/gtt.c | 12 +-- drivers/gpu/drm/i915/gvt/gvt.c | 6 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 20 ++--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +- drivers/gpu/drm/i915/i915_getparam.c | 5 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 6 +- drivers/gpu/drm/i915/i915_pmu.c | 5 +- drivers/gpu/drm/i915/i915_suspend.c | 4 +- drivers/gpu/drm/i915/i915_switcheroo.c | 4 +- drivers/gpu/drm/i915/i915_vgpu.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_region_lmem.c | 8 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 4 +- .../gpu/drm/i915/selftests/mock_gem_device.c | 1 - drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 20 +++-- drivers/gpu/drm/mgag200/mgag200_i2c.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mm.c | 10 ++- drivers/gpu/drm/nouveau/dispnv04/arb.c | 12 +-- drivers/gpu/drm/nouveau/dispnv04/disp.h | 14 +-- drivers/gpu/drm/nouveau/dispnv04/hw.c | 10 ++- drivers/gpu/drm/nouveau/nouveau_abi16.c | 7 +- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 11 ++- drivers/gpu/drm/nouveau/nouveau_connector.c | 10 ++- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 6 +- drivers/gpu/drm/nouveau/nouveau_vga.c | 20 +++-- drivers/gpu/drm/qxl/qxl_drv.c | 2 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 3 +- drivers/gpu/drm/qxl/qxl_irq.c | 3 +- drivers/gpu/drm/qxl/qxl_kms.c | 1 - drivers/gpu/drm/radeon/atombios_encoders.c | 6 +- drivers/gpu/drm/radeon/r100.c | 27 +++--- drivers/gpu/drm/radeon/radeon.h | 32 +++---- drivers/gpu/drm/radeon/radeon_atombios.c | 89 ++++++++++--------- drivers/gpu/drm/radeon/radeon_bios.c | 6 +- drivers/gpu/drm/radeon/radeon_combios.c | 55 ++++++------ drivers/gpu/drm/radeon/radeon_cs.c | 3 +- drivers/gpu/drm/radeon/radeon_device.c | 17 ++-- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 3 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 6 +- drivers/gpu/drm/radeon/radeon_i2c.c | 2 +- drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 20 ++--- .../gpu/drm/radeon/radeon_legacy_encoders.c | 6 +- drivers/gpu/drm/radeon/rs780_dpm.c | 7 +- drivers/gpu/drm/tiny/cirrus.c | 1 - drivers/gpu/drm/vboxvideo/vbox_drv.c | 11 +-- drivers/gpu/drm/vboxvideo/vbox_irq.c | 4 +- drivers/gpu/drm/vboxvideo/vbox_main.c | 8 +- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 7 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- include/drm/drm_device.h | 12 ++- 132 files changed, 584 insertions(+), 507 deletions(-)
--
2.29.2
Thomas Zimmermann
maintainerPATCH 1/15 drm/amdgpu: Remove references to struct drm_device.pdev
Using struct drm_device.pdev is deprecated. Convert amdgpu to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++----- 7 files changed, 25 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +11 -12
@@ -1404,9 +1404,9 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,/* don't suspend or resume card normally */ dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ; -pci_set_power_state (dev->pdev,PCI_D0 ); -amdgpu_device_load_pci_state (dev->pdev); - r =pci_enable_device (dev->pdev); +pci_set_power_state (pdev,PCI_D0 ); +amdgpu_device_load_pci_state (pdev); + r =pci_enable_device (pdev);if (r)DRM_WARN ("pci_enable_device failed (%d)\n" , r);amdgpu_device_resume (dev, true);
@@ -1418,10 +1418,10 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,drm_kms_helper_poll_disable (dev); dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ;amdgpu_device_suspend (dev, true); -amdgpu_device_cache_pci_state (dev->pdev); +amdgpu_device_cache_pci_state (pdev);/* Shut down the device */ -pci_disable_device (dev->pdev); -pci_set_power_state (dev->pdev, PCI_D3cold); +pci_disable_device (pdev); +pci_set_power_state (pdev, PCI_D3cold); dev->switch_power_state =DRM_SWITCH_POWER_OFF ; } }
@@ -1684,8 +1684,7 @@ static void amdgpu_device_enable_virtual_display(struct amdgpu_device *adev) adev->enable_virtual_display = false;if (amdgpu_virtual_display) { -struct drm_device *ddev =adev_to_drm (adev); -const char *pci_address_name =pci_name (ddev->pdev); +const char *pci_address_name =pci_name (adev->pdev);char *pciaddstr, *pciaddstr_tmp, *pciaddname_tmp, *pciaddname; pciaddstr =kstrdup (amdgpu_virtual_display,GFP_KERNEL );
@@ -3375,7 +3374,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, } } -pci_enable_pcie_error_reporting (adev->ddev.pdev); +pci_enable_pcie_error_reporting (adev->pdev);/* Post card if necessary */ if (amdgpu_device_need_post (adev)) {
@@ -4922,8 +4921,8 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_stacase pci_channel_io_normal:return PCI_ERS_RESULT_CAN_RECOVER ;/* Fatal error, prepare for slot reset */ -case pci_channel_io_frozen: -/* +case pci_channel_io_frozen: +/* * Cancel and wait for all TDRs in progress if failing to * set adev->in_gpu_reset in amdgpu_device_lock_adev *
@@ -5014,7 +5013,7 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) goto out; } - adev->in_pci_err_recovery = true; + adev->in_pci_err_recovery = true; r =amdgpu_device_pre_asic_reset (adev,NULL , &need_full_reset); adev->in_pci_err_recovery = false;if (r)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -1
@@ -721,13 +721,14 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd) { + struct amdgpu_device *adev = drm_to_adev(dev);struct drm_gem_object *obj;struct amdgpu_framebuffer *amdgpu_fb;int ret; obj =drm_gem_object_lookup (file_priv, mode_cmd->handles[0 ]);if (obj ==NULL ) { -dev_err (&dev->pdev->dev,"No GEM object associated to handle 0x%08X, " +dev_err (&adev->pdev->dev,"No GEM object associated to handle 0x%08X, " "can't create framebuffer\n" , mode_cmd->handles[0 ]);return ERR_PTR (-ENOENT ); }
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
@@ -1192,7 +1192,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,if (ret)return ret; - ddev->pdev = pdev;pci_set_drvdata (pdev, ddev); ret =amdgpu_driver_load_kms (adev, ent->driver_data);
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +1 -1
@@ -271,7 +271,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,DRM_INFO ("fb depth is %d\n" , fb->format->depth);DRM_INFO (" pitch is %d\n" , fb->pitches[0 ]); -vga_switcheroo_client_fb_set (adev_to_drm (adev)->pdev, info); +vga_switcheroo_client_fb_set (adev->pdev, info);return 0 ; out:
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +5 -5
@@ -614,7 +614,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,int r =0 ;if (args->va_address <AMDGPU_VA_RESERVED_SIZE ) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%LX is in reserved area 0x%LX\n" , args->va_address,AMDGPU_VA_RESERVED_SIZE );return -EINVAL ;
@@ -622,7 +622,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,if (args->va_address >=AMDGPU_GMC_HOLE_START && args->va_address <AMDGPU_GMC_HOLE_END ) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%LX is in VA hole 0x%LX-0x%LX\n" , args->va_address,AMDGPU_GMC_HOLE_START ,AMDGPU_GMC_HOLE_END );
@@ -634,14 +634,14 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, vm_size = adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; vm_size -=AMDGPU_VA_RESERVED_SIZE ;if (args->va_address + args->map_size > vm_size) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%llx is in top reserved area 0x%llx\n" , args->va_address + args->map_size, vm_size);return -EINVAL ; }if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) { -dev_dbg (&dev->pdev->dev,"invalid flags combination 0x%08X\n" , +dev_dbg (dev->dev,"invalid flags combination 0x%08X\n" , args->flags);return -EINVAL ; }
@@ -653,7 +653,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,case AMDGPU_VA_OP_REPLACE :break ;default : -dev_dbg (&dev->pdev->dev,"unsupported operation %d\n" , +dev_dbg (dev->dev,"unsupported operation %d\n" , args->operation);return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +1 -1
@@ -176,7 +176,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev, i2c->rec = *rec; i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c);mutex_init (&i2c->mutex);
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +5 -5
@@ -141,7 +141,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags) (amdgpu_is_atpx_hybrid () ||amdgpu_has_atpx_dgpu_power_cntl ()) && ((flags &AMD_IS_APU ) ==0 ) && - !pci_is_thunderbolt_attached(dev->pdev)) + !pci_is_thunderbolt_attached(to_pci_dev(dev->dev))) flags |= AMD_IS_PX;/* amdgpu_device_init should report only fatal error
@@ -152,7 +152,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)*/ r =amdgpu_device_init (adev, flags);if (r) { -dev_err (&dev->pdev->dev,"Fatal error during GPU init\n" ); +dev_err (dev->dev,"Fatal error during GPU init\n" ); goto out; }
@@ -192,7 +192,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags) acpi_status =amdgpu_acpi_init (adev);if (acpi_status) -dev_dbg (&dev->pdev->dev,"Error during ACPI methods call\n" ); +dev_dbg (dev->dev,"Error during ACPI methods call\n" );if (adev->runpm) {/* only need to skip on ATPX */
@@ -724,10 +724,10 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)uint64_t vm_size;memset (&dev_info,0 ,sizeof (dev_info)); - dev_info.device_id = dev->pdev->device; + dev_info.device_id = adev->pdev->device; dev_info.chip_rev = adev->rev_id; dev_info.external_rev = adev->external_rev_id; - dev_info.pci_rev = dev->pdev->revision; + dev_info.pci_rev = adev->pdev->revision; dev_info.family = adev->family; dev_info.num_shader_engines = adev->gfx.config.max_shader_engines; dev_info.num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
Signature · 6 lines
2.29.2 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 01/15] drm/amdgpu: Remove references to struct drm_device.pdev
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert amdgpu to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>
There are a few unrelated whitespace changes. Other than that, patch is:
Quoted 233 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 10 ++++----- 7 files changed, 25 insertions(+), 26 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +11
-12@@ -1404,9 +1404,9 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,/* don't suspend or resume card normally */ dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ; -pci_set_power_state (dev->pdev,PCI_D0 ); -amdgpu_device_load_pci_state (dev->pdev); - r =pci_enable_device (dev->pdev); +pci_set_power_state (pdev,PCI_D0 ); +amdgpu_device_load_pci_state (pdev); + r =pci_enable_device (pdev);if (r)DRM_WARN ("pci_enable_device failed (%d)\n" , r);amdgpu_device_resume (dev, true);@@ -1418,10 +1418,10 @@ static void amdgpu_switcheroo_set_state(struct pci_dev *pdev,drm_kms_helper_poll_disable (dev); dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ;amdgpu_device_suspend (dev, true); -amdgpu_device_cache_pci_state (dev->pdev); +amdgpu_device_cache_pci_state (pdev);/* Shut down the device */ -pci_disable_device (dev->pdev); -pci_set_power_state (dev->pdev, PCI_D3cold); +pci_disable_device (pdev); +pci_set_power_state (pdev, PCI_D3cold); dev->switch_power_state =DRM_SWITCH_POWER_OFF ; } }@@ -1684,8 +1684,7 @@ static void amdgpu_device_enable_virtual_display(struct amdgpu_device *adev) adev->enable_virtual_display = false;if (amdgpu_virtual_display) { -struct drm_device *ddev =adev_to_drm (adev); -const char *pci_address_name =pci_name (ddev->pdev); +const char *pci_address_name =pci_name (adev->pdev);char *pciaddstr, *pciaddstr_tmp, *pciaddname_tmp, *pciaddname; pciaddstr =kstrdup (amdgpu_virtual_display,GFP_KERNEL );@@ -3375,7 +3374,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, } } -pci_enable_pcie_error_reporting (adev->ddev.pdev); +pci_enable_pcie_error_reporting (adev->pdev);/* Post card if necessary */ if (amdgpu_device_need_post (adev)) {@@ -4922,8 +4921,8 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_stacase pci_channel_io_normal:return PCI_ERS_RESULT_CAN_RECOVER ;/* Fatal error, prepare for slot reset */ -case pci_channel_io_frozen: -/* +case pci_channel_io_frozen: +/* * Cancel and wait for all TDRs in progress if failing to * set adev->in_gpu_reset in amdgpu_device_lock_adev * @@ -5014,7 +5013,7 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) goto out; } - adev->in_pci_err_recovery = true; + adev->in_pci_err_recovery = true; r =amdgpu_device_pre_asic_reset (adev,NULL , &need_full_reset); adev->in_pci_err_recovery = false;if (r)drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2
-1@@ -721,13 +721,14 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd) { + struct amdgpu_device *adev = drm_to_adev(dev);struct drm_gem_object *obj;struct amdgpu_framebuffer *amdgpu_fb;int ret; obj =drm_gem_object_lookup (file_priv, mode_cmd->handles[0 ]);if (obj ==NULL ) { -dev_err (&dev->pdev->dev,"No GEM object associated to handle 0x%08X, " +dev_err (&adev->pdev->dev,"No GEM object associated to handle 0x%08X, " "can't create framebuffer\n" , mode_cmd->handles[0 ]);return ERR_PTR (-ENOENT ); }drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-1@@ -1192,7 +1192,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,if (ret)return ret; - ddev->pdev = pdev;pci_set_drvdata (pdev, ddev); ret =amdgpu_driver_load_kms (adev, ent->driver_data);drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +1
-1@@ -271,7 +271,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,DRM_INFO ("fb depth is %d\n" , fb->format->depth);DRM_INFO (" pitch is %d\n" , fb->pitches[0 ]); -vga_switcheroo_client_fb_set (adev_to_drm (adev)->pdev, info); +vga_switcheroo_client_fb_set (adev->pdev, info);return 0 ; out:drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +5
-5@@ -614,7 +614,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,int r =0 ;if (args->va_address <AMDGPU_VA_RESERVED_SIZE ) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%LX is in reserved area 0x%LX\n" , args->va_address,AMDGPU_VA_RESERVED_SIZE );return -EINVAL ;@@ -622,7 +622,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,if (args->va_address >=AMDGPU_GMC_HOLE_START && args->va_address <AMDGPU_GMC_HOLE_END ) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%LX is in VA hole 0x%LX-0x%LX\n" , args->va_address,AMDGPU_GMC_HOLE_START ,AMDGPU_GMC_HOLE_END );@@ -634,14 +634,14 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data, vm_size = adev->vm_manager.max_pfn *AMDGPU_GPU_PAGE_SIZE ; vm_size -=AMDGPU_VA_RESERVED_SIZE ;if (args->va_address + args->map_size > vm_size) { -dev_dbg (&dev->pdev->dev, +dev_dbg (dev->dev,"va_address 0x%llx is in top reserved area 0x%llx\n" , args->va_address + args->map_size, vm_size);return -EINVAL ; }if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) { -dev_dbg (&dev->pdev->dev,"invalid flags combination 0x%08X\n" , +dev_dbg (dev->dev,"invalid flags combination 0x%08X\n" , args->flags);return -EINVAL ; }@@ -653,7 +653,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,case AMDGPU_VA_OP_REPLACE :break ;default : -dev_dbg (&dev->pdev->dev,"unsupported operation %d\n" , +dev_dbg (dev->dev,"unsupported operation %d\n" , args->operation);return -EINVAL ; }drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +1
-1@@ -176,7 +176,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev, i2c->rec = *rec; i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c);mutex_init (&i2c->mutex);drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +5
-6@@ -141,7 +141,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags) (amdgpu_is_atpx_hybrid () ||amdgpu_has_atpx_dgpu_power_cntl ()) && ((flags &AMD_IS_APU ) ==0 ) && - !pci_is_thunderbolt_attached(dev->pdev)) + !pci_is_thunderbolt_attached(to_pci_dev(dev->dev))) flags |= AMD_IS_PX;/* amdgpu_device_init should report only fatal error @@ -152,7 +152,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)*/ r =amdgpu_device_init (adev, flags);if (r) { -dev_err (&dev->pdev->dev,"Fatal error during GPU init\n" ); +dev_err (dev->dev,"Fatal error during GPU init\n" ); goto out; }@@ -192,7 +192,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags) acpi_status =amdgpu_acpi_init (adev);if (acpi_status) -dev_dbg (&dev->pdev->dev,"Error during ACPI methods call\n" ); +dev_dbg (dev->dev,"Error during ACPI methods call\n" );if (adev->runpm) {/* only need to skip on ATPX */ @@ -724,10 +724,10 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)uint64_t vm_size;memset (&dev_info,0 ,sizeof (dev_info)); - dev_info.device_id = dev->pdev->device; + dev_info.device_id = adev->pdev->device; dev_info.chip_rev = adev->rev_id; dev_info.external_rev = adev->external_rev_id; - dev_info.pci_rev = dev->pdev->revision; + dev_info.pci_rev = adev->pdev->revision; dev_info.family = adev->family; dev_info.num_shader_engines = adev->gfx.config.max_shader_engines; dev_info.num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se; --2.29.2
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Thomas Zimmermann
maintainerPATCH 2/15 drm/ast: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert ast to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/ast/ast_drv.c | 4 ++-- drivers/gpu/drm/ast/ast_main.c | 25 +++++++++++++------------ drivers/gpu/drm/ast/ast_mm.c | 17 +++++++++-------- drivers/gpu/drm/ast/ast_mode.c | 5 +++-- drivers/gpu/drm/ast/ast_post.c | 8 +++++--- 5 files changed, 32 insertions(+), 27 deletions(-)
drivers/gpu/drm/ast/ast_drv.c +2 -2
@@ -147,7 +147,7 @@ static int ast_drm_freeze(struct drm_device *dev) error =drm_mode_config_helper_suspend (dev);if (error)return error; -pci_save_state (dev->pdev); +pci_save_state (to_pci_dev (dev->dev));return 0 ; }
@@ -162,7 +162,7 @@ static int ast_drm_resume(struct drm_device *dev) {int ret; -if (pci_enable_device (dev->pdev)) +if (pci_enable_device (to_pci_dev (dev->dev)))return -EIO ; ret =ast_drm_thaw (dev);
drivers/gpu/drm/ast/ast_main.c +13 -12
@@ -67,8 +67,9 @@ uint8_t ast_get_index_reg_mask(struct ast_private *ast,static void ast_detect_config_mode (struct drm_device *dev,u32 *scu_rev) { -struct device_node *np = dev->pdev->dev.of_node; +struct device_node *np = dev->dev->of_node;struct ast_private *ast =to_ast_private (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);uint32_t data, jregd0, jregd1;/* Defaults */
@@ -85,7 +86,7 @@ static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev) }/* Not all families have a P2A bridge */ -if (dev->pdev->device !=PCI_CHIP_AST2000 ) +if (pdev->device !=PCI_CHIP_AST2000 )return ;/*
@@ -119,6 +120,7 @@ static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)static int ast_detect_chip (struct drm_device *dev,bool *need_post) {struct ast_private *ast =to_ast_private (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);uint32_t jreg, scu_rev;/*
@@ -143,19 +145,19 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)ast_detect_config_mode (dev, &scu_rev);/* Identify chipset */ -if (dev->pdev->revision >=0x50 ) { +if (pdev->revision >=0x50 ) { ast->chip =AST2600 ;drm_info (dev,"AST 2600 detected\n" ); - }else if (dev->pdev->revision >=0x40 ) { + }else if (pdev->revision >=0x40 ) { ast->chip =AST2500 ;drm_info (dev,"AST 2500 detected\n" ); - }else if (dev->pdev->revision >=0x30 ) { + }else if (pdev->revision >=0x30 ) { ast->chip =AST2400 ;drm_info (dev,"AST 2400 detected\n" ); - }else if (dev->pdev->revision >=0x20 ) { + }else if (pdev->revision >=0x20 ) { ast->chip =AST2300 ;drm_info (dev,"AST 2300 detected\n" ); - }else if (dev->pdev->revision >=0x10 ) { + }else if (pdev->revision >=0x10 ) {switch (scu_rev &0x0300 ) {case 0x0200 : ast->chip =AST1100 ;
@@ -265,7 +267,7 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)static int ast_get_dram_info (struct drm_device *dev) { -struct device_node *np = dev->pdev->dev.of_node; +struct device_node *np = dev->dev->of_node;struct ast_private *ast =to_ast_private (dev);uint32_t mcr_cfg, mcr_scu_mpll, mcr_scu_strap;uint32_t denum, num, div, ref_pll, dsel;
@@ -409,10 +411,9 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,return ast; dev = &ast->base; - dev->pdev = pdev;pci_set_drvdata (pdev, dev); - ast->regs =pci_iomap (dev->pdev,1 ,0 ); + ast->regs =pci_iomap (pdev,1 ,0 );if (!ast->regs)return ERR_PTR (-EIO );
@@ -421,14 +422,14 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,* assume the chip has MMIO enabled by default (rev 0x20 * and higher). */ -if (!(pci_resource_flags (dev->pdev,2 ) &IORESOURCE_IO )) { +if (!(pci_resource_flags (pdev,2 ) &IORESOURCE_IO )) {drm_info (dev,"platform has no IO space, trying MMIO\n" ); ast->ioregs = ast->regs +AST_IO_MM_OFFSET ; }/* "map" IO regs if the above hasn't done so already */ if (!ast->ioregs) { - ast->ioregs =pci_iomap (dev->pdev,2 ,0 ); + ast->ioregs =pci_iomap (pdev,2 ,0 );if (!ast->ioregs)return ERR_PTR (-EIO ); }
drivers/gpu/drm/ast/ast_mm.c +9 -8
@@ -77,31 +77,32 @@ static u32 ast_get_vram_size(struct ast_private *ast)static void ast_mm_release (struct drm_device *dev,void *ptr) {struct ast_private *ast =to_ast_private (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);arch_phys_wc_del (ast->fb_mtrr); -arch_io_free_memtype_wc (pci_resource_start (dev->pdev,0 ), -pci_resource_len (dev->pdev,0 )); +arch_io_free_memtype_wc (pci_resource_start (pdev,0 ), +pci_resource_len (pdev,0 )); }int ast_mm_init (struct ast_private *ast) {struct drm_device *dev = &ast->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 vram_size;int ret; vram_size =ast_get_vram_size (ast); - ret =drmm_vram_helper_init (dev,pci_resource_start (dev->pdev,0 ), - vram_size); + ret =drmm_vram_helper_init (dev,pci_resource_start (pdev,0 ), vram_size);if (ret) {drm_err (dev,"Error initializing VRAM MM; %d\n" , ret);return ret; } -arch_io_reserve_memtype_wc (pci_resource_start (dev->pdev,0 ), -pci_resource_len (dev->pdev,0 )); - ast->fb_mtrr =arch_phys_wc_add (pci_resource_start (dev->pdev,0 ), -pci_resource_len (dev->pdev,0 )); +arch_io_reserve_memtype_wc (pci_resource_start (pdev,0 ), +pci_resource_len (pdev,0 )); + ast->fb_mtrr =arch_phys_wc_add (pci_resource_start (pdev,0 ), +pci_resource_len (pdev,0 ));return drmm_add_action_or_reset (dev, ast_mm_release,NULL ); }
drivers/gpu/drm/ast/ast_mode.c +3 -2
@@ -1107,6 +1107,7 @@ static const struct drm_mode_config_funcs ast_mode_config_funcs = {int ast_mode_config_init (struct ast_private *ast) {struct drm_device *dev = &ast->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);int ret; ret =ast_cursor_init (ast);
@@ -1122,7 +1123,7 @@ int ast_mode_config_init(struct ast_private *ast) dev->mode_config.min_height =0 ; dev->mode_config.preferred_depth =24 ; dev->mode_config.prefer_shadow =1 ; - dev->mode_config.fb_base =pci_resource_start (dev->pdev,0 ); + dev->mode_config.fb_base =pci_resource_start (pdev,0 ); if (ast->chip == AST2100 || ast->chip == AST2200 ||
@@ -1259,7 +1260,7 @@ static struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev) i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c); snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
drivers/gpu/drm/ast/ast_post.c +5 -3
@@ -71,6 +71,7 @@ static void ast_set_def_ext_reg(struct drm_device *dev) {struct ast_private *ast =to_ast_private (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);u8 i, index, reg;const u8 *ext_reg_info;
@@ -80,7 +81,7 @@ ast_set_def_ext_reg(struct drm_device *dev)if (ast->chip ==AST2300 || ast->chip ==AST2400 || ast->chip ==AST2500 ) { -if (dev->pdev->revision >=0x20 ) +if (pdev->revision >=0x20 ) ext_reg_info = extreginfo_ast2300;else ext_reg_info = extreginfo_ast2300a0;
@@ -366,11 +367,12 @@ static void ast_init_dram_reg(struct drm_device *dev)void ast_post_gpu (struct drm_device *dev) {struct ast_private *ast =to_ast_private (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 reg; -pci_read_config_dword (dev->pdev,0x04 , ®); +pci_read_config_dword (pdev,0x04 , ®); reg |=0x3 ; -pci_write_config_dword (dev->pdev,0x04 , reg); +pci_write_config_dword (pdev,0x04 , reg);ast_enable_vga (dev);ast_open_key (ast);
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 3/15 drm/bochs: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert bochs to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/bochs/bochs_drv.c | 1 - drivers/gpu/drm/bochs/bochs_hw.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/bochs/bochs_drv.c +0 -1
@@ -121,7 +121,6 @@ static int bochs_pci_probe(struct pci_dev *pdev,if (ret) goto err_free_dev; - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =bochs_load (dev);
drivers/gpu/drm/bochs/bochs_hw.c +2 -2
@@ -110,7 +110,7 @@ int bochs_hw_load_edid(struct bochs_device *bochs)int bochs_hw_init (struct drm_device *dev) {struct bochs_device *bochs = dev->dev_private; -struct pci_dev *pdev = dev->pdev; +struct pci_dev *pdev =to_pci_dev (dev->dev);unsigned long addr, size, mem, ioaddr, iosize;u16 id;
@@ -201,7 +201,7 @@ void bochs_hw_fini(struct drm_device *dev)release_region (VBE_DISPI_IOPORT_INDEX ,2 );if (bochs->fb_map)iounmap (bochs->fb_map); -pci_release_regions (dev->pdev); +pci_release_regions (to_pci_dev (dev->dev));kfree (bochs->edid); }
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 4/15 drm/cirrus: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert cirrus to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/tiny/cirrus.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/tiny/cirrus.c +0 -1
@@ -602,7 +602,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev,drm_mode_config_reset (dev); - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =drm_dev_register (dev,0 );if (ret)
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 5/15 drm/gma500: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert gma500 to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/gma500/cdv_device.c | 30 +++++++++++------- drivers/gpu/drm/gma500/cdv_intel_crt.c | 3 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 4 +-- drivers/gpu/drm/gma500/framebuffer.c | 9 +++--- drivers/gpu/drm/gma500/gma_device.c | 3 +- drivers/gpu/drm/gma500/gma_display.c | 4 +-- drivers/gpu/drm/gma500/gtt.c | 20 ++++++------ drivers/gpu/drm/gma500/intel_bios.c | 6 ++-- drivers/gpu/drm/gma500/intel_gmbus.c | 4 +-- drivers/gpu/drm/gma500/intel_i2c.c | 2 +- drivers/gpu/drm/gma500/mdfld_device.c | 4 ++- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 8 ++--- drivers/gpu/drm/gma500/mid_bios.c | 9 ++++-- drivers/gpu/drm/gma500/oaktrail_device.c | 5 +-- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 2 +- drivers/gpu/drm/gma500/opregion.c | 3 +- drivers/gpu/drm/gma500/power.c | 13 ++++---- drivers/gpu/drm/gma500/psb_drv.c | 16 +++++----- drivers/gpu/drm/gma500/psb_drv.h | 8 ++--- drivers/gpu/drm/gma500/psb_intel_lvds.c | 6 ++-- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 36 +++++++++++----------- 23 files changed, 109 insertions(+), 90 deletions(-)
drivers/gpu/drm/gma500/cdv_device.c +19 -11
@@ -95,13 +95,14 @@ static u32 cdv_get_max_backlight(struct drm_device *dev)static int cdv_get_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 val =REG_READ (BLC_PWM_CTL ) &BACKLIGHT_DUTY_CYCLE_MASK ;if (cdv_backlight_combination_mode (dev)) {u8 lbpc; val &= ~1 ; -pci_read_config_byte (dev->pdev,0xF4 , &lbpc); +pci_read_config_byte (pdev,0xF4 , &lbpc); val *= lbpc; }return (val *100 )/cdv_get_max_backlight (dev);
@@ -111,6 +112,7 @@ static int cdv_get_brightness(struct backlight_device *bd)static int cdv_set_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); +struct pci_dev *pdev =to_pci_dev (dev->dev);int level = bd->props.brightness;u32 blc_pwm_ctl;
@@ -128,7 +130,7 @@ static int cdv_set_brightness(struct backlight_device *bd) lbpc = level *0xfe / max +1 ; level /= lbpc; -pci_write_config_byte (dev->pdev,0xF4 , lbpc); +pci_write_config_byte (pdev,0xF4 , lbpc); } blc_pwm_ctl =REG_READ (BLC_PWM_CTL ) & ~BACKLIGHT_DUTY_CYCLE_MASK ;
@@ -205,8 +207,9 @@ static inline void CDV_MSG_WRITE32(int domain, uint port, uint offset,static void cdv_init_pm (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 pwr_cnt; -int domain =pci_domain_nr (dev->pdev->bus); +int domain =pci_domain_nr (pdev->bus);int i; dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
@@ -234,6 +237,8 @@ static void cdv_init_pm(struct drm_device *dev)static void cdv_errata (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +/* Disable bonus launch. * CPU and GPU competes for memory and display misses updates and * flickers. Worst with dual core, dual displays.
@@ -242,7 +247,7 @@ static void cdv_errata(struct drm_device *dev)* Bonus Launch to work around the issue, by degrading * performance. */ -CDV_MSG_WRITE32 (pci_domain_nr (dev->pdev->bus),3 ,0x30 ,0x08027108 ); +CDV_MSG_WRITE32 (pci_domain_nr (pdev->bus),3 ,0x30 ,0x08027108 ); }/**
@@ -255,12 +260,13 @@ static void cdv_errata(struct drm_device *dev)static int cdv_save_display_registers (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_save_area *regs = &dev_priv->regs;struct drm_connector *connector;dev_dbg (dev->dev,"Saving GPU registers.\n" ); -pci_read_config_byte (dev->pdev,0xF4 , ®s->cdv.saveLBB); +pci_read_config_byte (pdev,0xF4 , ®s->cdv.saveLBB); regs->cdv.saveDSPCLK_GATE_D =REG_READ (DSPCLK_GATE_D ); regs->cdv.saveRAMCLK_GATE_D =REG_READ (RAMCLK_GATE_D );
@@ -309,11 +315,12 @@ static int cdv_save_display_registers(struct drm_device *dev)static int cdv_restore_display_registers (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_save_area *regs = &dev_priv->regs;struct drm_connector *connector;u32 temp; -pci_write_config_byte (dev->pdev,0xF4 , regs->cdv.saveLBB); +pci_write_config_byte (pdev,0xF4 , regs->cdv.saveLBB);REG_WRITE (DSPCLK_GATE_D , regs->cdv.saveDSPCLK_GATE_D);REG_WRITE (RAMCLK_GATE_D , regs->cdv.saveRAMCLK_GATE_D);
@@ -421,16 +428,16 @@ static int cdv_power_up(struct drm_device *dev)static void cdv_hotplug_work_func (struct work_struct *work) { struct drm_psb_private *dev_priv = container_of(work, struct drm_psb_private, - hotplug_work); + hotplug_work);struct drm_device *dev = dev_priv->dev;/* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event (dev); -} +}/* The core driver has received a hotplug IRQ. We are in IRQ context so extract the needed information and kick off queued processing */ - +static int cdv_hotplug_event (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;
@@ -449,7 +456,7 @@ static void cdv_hotplug_enable(struct drm_device *dev, bool on) }else {REG_WRITE (PORT_HOTPLUG_EN ,0 );REG_WRITE (PORT_HOTPLUG_STAT ,REG_READ (PORT_HOTPLUG_STAT )); - } + } }static const char *force_audio_names[] = {
@@ -568,9 +575,10 @@ static const struct psb_offset cdv_regmap[2] = {static int cdv_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);INIT_WORK (&dev_priv->hotplug_work, cdv_hotplug_work_func); -if (pci_enable_msi (dev->pdev)) +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = cdv_regmap;gma_get_core_freq (dev);
drivers/gpu/drm/gma500/cdv_intel_crt.c +1 -2
@@ -278,8 +278,7 @@ void cdv_intel_crt_init(struct drm_device *dev, gma_encoder->ddc_bus =psb_intel_i2c_create (dev, i2c_reg,"CRTDDC_A" );if (!gma_encoder->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev,"DDC bus registration " -"failed.\n" ); +dev_printk (KERN_ERR , dev->dev,"DDC bus registration failed.\n" ); goto failed_ddc; }
drivers/gpu/drm/gma500/cdv_intel_lvds.c +2 -2
@@ -554,7 +554,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, "LVDSBLC_B");if (!gma_encoder->i2c_bus) {dev_printk (KERN_ERR , - &dev->pdev->dev,"I2C bus registration failed.\n" ); + dev->dev,"I2C bus registration failed.\n" ); goto failed_blc_i2c; } gma_encoder->i2c_bus->slave_addr =0x2C ;
@@ -575,7 +575,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,GPIOC , "LVDSDDC_C");if (!gma_encoder->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev, +dev_printk (KERN_ERR , dev->dev,"DDC bus registration " "failed.\n" ); goto failed_ddc; }
drivers/gpu/drm/gma500/framebuffer.c +5 -4
@@ -262,6 +262,7 @@ static int psbfb_create(struct drm_fb_helper *fb_helper, {struct drm_device *dev = fb_helper->dev;struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct fb_info *info;struct drm_framebuffer *fb;struct drm_mode_fb_cmd2 mode_cmd;
@@ -325,8 +326,8 @@ static int psbfb_create(struct drm_fb_helper *fb_helper,drm_fb_helper_fill_info (info, fb_helper, sizes); - info->fix.mmio_start =pci_resource_start (dev->pdev,0 ); - info->fix.mmio_len =pci_resource_len (dev->pdev,0 ); + info->fix.mmio_start =pci_resource_start (pdev,0 ); + info->fix.mmio_len =pci_resource_len (pdev,0 );/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
@@ -529,6 +530,7 @@ void psb_modeset_init(struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;struct psb_intel_mode_device *mode_dev = &dev_priv->mode_dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);int i;drm_mode_config_init (dev);
@@ -540,8 +542,7 @@ void psb_modeset_init(struct drm_device *dev)/* set memory base */ /* Oaktrail and Poulsbo should use BAR 2*/ -pci_read_config_dword (dev->pdev,PSB_BSM , (u32 *) - &(dev->mode_config.fb_base)); +pci_read_config_dword (pdev,PSB_BSM , (u32 *)&(dev->mode_config.fb_base));/* num pipes is 2 for PSB but 1 for Mrst */ for (i =0 ; i < dev_priv->num_pipe; i++)
drivers/gpu/drm/gma500/gma_device.c +2 -1
@@ -10,8 +10,9 @@void gma_get_core_freq (struct drm_device *dev) {uint32_t clock; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct pci_dev *pci_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,0 );struct drm_psb_private *dev_priv = dev->dev_private;
drivers/gpu/drm/gma500/gma_display.c +2 -2
@@ -559,9 +559,9 @@ int gma_crtc_set_config(struct drm_mode_set *set,if (!dev_priv->rpm_enabled)return drm_crtc_helper_set_config (set, ctx); -pm_runtime_forbid (&dev->pdev->dev); +pm_runtime_forbid (dev->dev); ret =drm_crtc_helper_set_config (set, ctx); -pm_runtime_allow (&dev->pdev->dev); +pm_runtime_allow (dev->dev);return ret; }
drivers/gpu/drm/gma500/gtt.c +11 -9
@@ -340,13 +340,14 @@ static void psb_gtt_alloc(struct drm_device *dev)void psb_gtt_takedown (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);if (dev_priv->gtt_map) {iounmap (dev_priv->gtt_map); dev_priv->gtt_map =NULL ; }if (dev_priv->gtt_initialized) { -pci_write_config_word (dev->pdev,PSB_GMCH_CTRL , +pci_write_config_word (pdev,PSB_GMCH_CTRL , dev_priv->gmch_ctrl);PSB_WVDC32 (dev_priv->pge_ctl,PSB_PGETBL_CTL ); (void )PSB_RVDC32 (PSB_PGETBL_CTL );
@@ -358,6 +359,7 @@ void psb_gtt_takedown(struct drm_device *dev)int psb_gtt_init (struct drm_device *dev,int resume) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);unsigned gtt_pages;unsigned long stolen_size, vram_stolen_size;unsigned i, num_pages;
@@ -376,8 +378,8 @@ int psb_gtt_init(struct drm_device *dev, int resume) pg = &dev_priv->gtt;/* Enable the GTT */ -pci_read_config_word (dev->pdev,PSB_GMCH_CTRL , &dev_priv->gmch_ctrl); -pci_write_config_word (dev->pdev,PSB_GMCH_CTRL , +pci_read_config_word (pdev,PSB_GMCH_CTRL , &dev_priv->gmch_ctrl); +pci_write_config_word (pdev,PSB_GMCH_CTRL , dev_priv->gmch_ctrl | _PSB_GMCH_ENABLED); dev_priv->pge_ctl =PSB_RVDC32 (PSB_PGETBL_CTL );
@@ -397,8 +399,8 @@ int psb_gtt_init(struct drm_device *dev, int resume)*/ pg->mmu_gatt_start =0xE0000000 ; - pg->gtt_start =pci_resource_start (dev->pdev,PSB_GTT_RESOURCE ); - gtt_pages =pci_resource_len (dev->pdev,PSB_GTT_RESOURCE ) + pg->gtt_start =pci_resource_start (pdev,PSB_GTT_RESOURCE ); + gtt_pages =pci_resource_len (pdev,PSB_GTT_RESOURCE ) >>PAGE_SHIFT ;/* CDV doesn't report this. In which case the system has 64 gtt pages */ if (pg->gtt_start ==0 || gtt_pages ==0 ) {
@@ -407,10 +409,10 @@ int psb_gtt_init(struct drm_device *dev, int resume) pg->gtt_start = dev_priv->pge_ctl; } - pg->gatt_start =pci_resource_start (dev->pdev,PSB_GATT_RESOURCE ); - pg->gatt_pages =pci_resource_len (dev->pdev,PSB_GATT_RESOURCE ) + pg->gatt_start =pci_resource_start (pdev,PSB_GATT_RESOURCE ); + pg->gatt_pages =pci_resource_len (pdev,PSB_GATT_RESOURCE ) >>PAGE_SHIFT ; - dev_priv->gtt_mem = &dev->pdev->resource[PSB_GATT_RESOURCE ]; + dev_priv->gtt_mem = &pdev->resource[PSB_GATT_RESOURCE ];if (pg->gatt_pages ==0 || pg->gatt_start ==0 ) {static struct resource fudge;/* Preferably peppermint */
@@ -431,7 +433,7 @@ int psb_gtt_init(struct drm_device *dev, int resume) dev_priv->gtt_mem = &fudge; } -pci_read_config_dword (dev->pdev,PSB_BSM , &dev_priv->stolen_base); +pci_read_config_dword (pdev,PSB_BSM , &dev_priv->stolen_base); vram_stolen_size = pg->gtt_phys_start - dev_priv->stolen_base -PAGE_SIZE ;
drivers/gpu/drm/gma500/intel_bios.c +3 -3
@@ -50,7 +50,7 @@ parse_edp(struct drm_psb_private *dev_priv, struct bdb_header *bdb)uint8_t panel_type; edp =find_section (bdb,BDB_EDP ); - + dev_priv->edp.bpp =18 ;if (!edp) {if (dev_priv->edp.support) {
@@ -80,7 +80,7 @@ parse_edp(struct drm_psb_private *dev_priv, struct bdb_header *bdb) dev_priv->edp.pps = *edp_pps;DRM_DEBUG_KMS ("EDP timing in vbt t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n" , - dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, + dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, dev_priv->edp.pps.t9, dev_priv->edp.pps.t10, dev_priv->edp.pps.t11_t12);
@@ -516,7 +516,7 @@ parse_device_mapping(struct drm_psb_private *dev_priv,int psb_intel_init_bios (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; -struct pci_dev *pdev = dev->pdev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct vbt_header *vbt =NULL ;struct bdb_header *bdb =NULL ;u8 __iomem *bios =NULL ;
drivers/gpu/drm/gma500/intel_gmbus.c +2 -2
@@ -196,7 +196,7 @@ intel_gpio_create(struct drm_psb_private *dev_priv, u32 pin) "gma500 GPIO%c", "?BACDE?F"[pin]); gpio->adapter.owner =THIS_MODULE ; gpio->adapter.algo_data = &gpio->algo; - gpio->adapter.dev.parent = &dev_priv->dev->pdev->dev; + gpio->adapter.dev.parent = dev_priv->dev->dev; gpio->algo.setsda = set_data; gpio->algo.setscl = set_clock; gpio->algo.getsda = get_data;
@@ -417,7 +417,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)"gma500 gmbus %s" , names[i]); - bus->adapter.dev.parent = &dev->pdev->dev; + bus->adapter.dev.parent = dev->dev; bus->adapter.algo_data = dev_priv; bus->adapter.algo = &gmbus_algorithm;
drivers/gpu/drm/gma500/intel_i2c.c +1 -1
@@ -117,7 +117,7 @@ struct psb_intel_i2c_chan *psb_intel_i2c_create(struct drm_device *dev,snprintf (chan->adapter.name,I2C_NAME_SIZE ,"intel drm %s" , name); chan->adapter.owner =THIS_MODULE ; chan->adapter.algo_data = &chan->algo; - chan->adapter.dev.parent = &dev->pdev->dev; + chan->adapter.dev.parent = dev->dev; chan->algo.setsda = set_data; chan->algo.setscl = set_clock; chan->algo.getsda = get_data;
drivers/gpu/drm/gma500/mdfld_device.c +3 -1
@@ -523,7 +523,9 @@ static struct gpiod_lookup_table mdfld_dsi_pipe_gpio_table = {static int mdfld_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; -if (pci_enable_msi (dev->pdev)) +struct pci_dev *pdev =to_pci_dev (dev->dev); + +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = mdfld_regmap;
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +4 -4
@@ -138,7 +138,7 @@ static void dsi_set_pipe_plane_enable_state(struct drm_device *dev,REG_WRITE (pipeconf_reg,BIT (31 ));if (REG_BIT_WAIT (pipeconf_reg,1 ,30 )) -dev_err (&dev->pdev->dev,"%s: Pipe enable timeout\n" , +dev_err (dev->dev,"%s: Pipe enable timeout\n" , __func__);/*Set up display plane */
@@ -165,11 +165,11 @@ static void dsi_set_pipe_plane_enable_state(struct drm_device *dev,REG_FLD_MOD (pipeconf_reg,0 ,31 ,31 );if (REG_BIT_WAIT (pipeconf_reg,0 ,30 )) -dev_err (&dev->pdev->dev,"%s: Pipe disable timeout\n" , +dev_err (dev->dev,"%s: Pipe disable timeout\n" , __func__);if (REG_BIT_WAIT (MIPI_GEN_FIFO_STAT_REG (pipe),1 ,28 )) -dev_err (&dev->pdev->dev,"%s: FIFO not empty\n" , +dev_err (dev->dev,"%s: FIFO not empty\n" , __func__); } }
@@ -867,7 +867,7 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,REG_WRITE (MRST_DPLL_A ,0x80800000 );if (REG_BIT_WAIT (pipeconf_reg,1 ,29 )) -dev_err (&dev->pdev->dev,"%s: DSI PLL lock timeout\n" , +dev_err (dev->dev,"%s: DSI PLL lock timeout\n" , __func__);REG_WRITE (MIPI_DPHY_PARAM_REG (pipe),0x2A0c6008 );
drivers/gpu/drm/gma500/mid_bios.c +6 -3
@@ -19,8 +19,9 @@static void mid_get_fuse_settings (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct pci_dev *pci_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,0 );uint32_t fuse_value =0 ;uint32_t fuse_value_tmp =0 ;
@@ -93,7 +94,8 @@ static void mid_get_fuse_settings(struct drm_device *dev)static void mid_get_pci_revID (struct drm_psb_private *dev_priv) {uint32_t platform_rev_id =0 ; -int domain =pci_domain_nr (dev_priv->dev->pdev->bus); +struct pci_dev *pdev =to_pci_dev (dev_priv->dev->dev); +int domain =pci_domain_nr (pdev->bus);struct pci_dev *pci_gfx_root =pci_get_domain_bus_and_slot (domain,0 ,PCI_DEVFN (2 ,0 ));
@@ -269,11 +271,12 @@ static int mid_get_vbt_data_r10(struct drm_psb_private *dev_priv, u32 addr)static void mid_get_vbt_data (struct drm_psb_private *dev_priv) {struct drm_device *dev = dev_priv->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 addr;u8 __iomem *vbt_virtual;struct mid_vbt_header vbt_header;struct pci_dev *pci_gfx_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,PCI_DEVFN (2 ,0 ));int ret =-1 ;
drivers/gpu/drm/gma500/oaktrail_device.c +3 -2
@@ -504,9 +504,10 @@ static const struct psb_offset oaktrail_regmap[2] = {static int oaktrail_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);int ret; - -if (pci_enable_msi (dev->pdev)) + +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = oaktrail_regmap;
drivers/gpu/drm/gma500/oaktrail_lvds.c +1 -1
@@ -60,7 +60,7 @@ static void oaktrail_lvds_set_power(struct drm_device *dev, pp_status =REG_READ (PP_STATUS ); }while (pp_status &PP_ON ); dev_priv->is_lvds_on = false; -pm_request_idle (&dev->pdev->dev); +pm_request_idle (dev->dev); }gma_power_end (dev); }
drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c +1 -1
@@ -145,7 +145,7 @@ void oaktrail_lvds_i2c_init(struct drm_encoder *encoder)strncpy (chan->adapter.name,"gma500 LPC" ,I2C_NAME_SIZE -1 ); chan->adapter.owner =THIS_MODULE ; chan->adapter.algo_data = &chan->algo; - chan->adapter.dev.parent = &dev->pdev->dev; + chan->adapter.dev.parent = dev->dev; chan->algo.setsda = set_data; chan->algo.setscl = set_clock; chan->algo.getsda = get_data;
drivers/gpu/drm/gma500/opregion.c +2 -1
@@ -305,12 +305,13 @@ void psb_intel_opregion_fini(struct drm_device *dev)int psb_intel_opregion_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_intel_opregion *opregion = &dev_priv->opregion;u32 opregion_phy, mboxes;void __iomem *base;int err =0 ; -pci_read_config_dword (dev->pdev,PCI_ASLS , &opregion_phy); +pci_read_config_dword (pdev,PCI_ASLS , &opregion_phy);if (opregion_phy ==0 ) {DRM_DEBUG_DRIVER ("ACPI Opregion not supported\n" );return -ENOTSUPP ;
drivers/gpu/drm/gma500/power.c +7 -6
@@ -70,8 +70,8 @@ void gma_power_init(struct drm_device *dev)*/ void gma_power_uninit (struct drm_device *dev) { -pm_runtime_disable (&dev->pdev->dev); -pm_runtime_set_suspended (&dev->pdev->dev); +pm_runtime_disable (dev->dev); +pm_runtime_set_suspended (dev->dev); }/**
@@ -249,6 +249,7 @@ bool gma_power_is_on(struct drm_device *dev)bool gma_power_begin (struct drm_device *dev,bool force_on) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);int ret;unsigned long flags;
@@ -256,7 +257,7 @@ bool gma_power_begin(struct drm_device *dev, bool force_on)/* Power already on ? */ if (dev_priv->display_power) { dev_priv->display_count++; -pm_runtime_get (&dev->pdev->dev); +pm_runtime_get (dev->dev);spin_unlock_irqrestore (&power_ctrl_lock, flags);return true; }
@@ -264,11 +265,11 @@ bool gma_power_begin(struct drm_device *dev, bool force_on) goto out_false;/* Ok power up needed */ - ret =gma_resume_pci (dev->pdev); + ret =gma_resume_pci (pdev);if (ret ==0 ) {psb_irq_preinstall (dev);psb_irq_postinstall (dev); -pm_runtime_get (&dev->pdev->dev); +pm_runtime_get (dev->dev); dev_priv->display_count++;spin_unlock_irqrestore (&power_ctrl_lock, flags);return true;
@@ -293,7 +294,7 @@ void gma_power_end(struct drm_device *dev) dev_priv->display_count--;WARN_ON (dev_priv->display_count <0 );spin_unlock_irqrestore (&power_ctrl_lock, flags); -pm_runtime_put (&dev->pdev->dev); +pm_runtime_put (dev->dev); }int psb_runtime_suspend (struct device *dev)
drivers/gpu/drm/gma500/psb_drv.c +8 -8
@@ -208,6 +208,7 @@ static void psb_driver_unload(struct drm_device *dev)static int psb_driver_load (struct drm_device *dev,unsigned long flags) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_psb_private *dev_priv;unsigned long resource_start, resource_len;unsigned long irqflags;
@@ -227,11 +228,11 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) pg = &dev_priv->gtt; -pci_set_master (dev->pdev); +pci_set_master (pdev); dev_priv->num_pipe = dev_priv->ops->pipes; - resource_start =pci_resource_start (dev->pdev,PSB_MMIO_RESOURCE ); + resource_start =pci_resource_start (pdev,PSB_MMIO_RESOURCE ); dev_priv->vdc_reg =ioremap (resource_start +PSB_VDC_OFFSET ,PSB_VDC_SIZE );
@@ -244,7 +245,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) goto out_err;if (IS_MRST (dev)) { -int domain =pci_domain_nr (dev->pdev->bus); +int domain =pci_domain_nr (pdev->bus); dev_priv->aux_pdev = pci_get_domain_bus_and_slot(domain, 0,
@@ -359,7 +360,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)PSB_WVDC32 (0xFFFFFFFF ,PSB_INT_MASK_R );spin_unlock_irqrestore (&dev_priv->irqmask_lock, irqflags); -drm_irq_install (dev, dev->pdev->irq); +drm_irq_install (dev, pdev->irq); dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */
@@ -385,8 +386,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)psb_intel_opregion_enable_asle (dev);#if 0 /* Enable runtime pm at last */ -pm_runtime_enable (&dev->pdev->dev); -pm_runtime_set_active (&dev->pdev->dev); +pm_runtime_enable (dev->dev); +pm_runtime_set_active (dev->dev);#endif /* Intel drm driver load is done, continue doing pvr load */ return 0 ;
@@ -415,7 +416,7 @@ static long psb_unlocked_ioctl(struct file *filp, unsigned int cmd,if (runtime_allowed ==1 && dev_priv->is_lvds_on) { runtime_allowed++; -pm_runtime_allow (&dev->pdev->dev); +pm_runtime_allow (dev->dev); dev_priv->rpm_enabled =1 ; }return drm_ioctl (filp, cmd, arg);
@@ -437,7 +438,6 @@ static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_pci_disable_device; } - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =psb_driver_load (dev, ent->driver_data);
drivers/gpu/drm/gma500/psb_drv.h +4 -4
@@ -43,10 +43,10 @@ enum { CHIP_MFLD_0130 = 3, /* Medfield */ }; -#define IS_PSB (dev) (((dev)->pdev->device & 0xfffe) == 0x8108) -#define IS_MRST (dev) (((dev)->pdev->device & 0xfff0) == 0x4100) -#define IS_MFLD (dev) (((dev)->pdev->device & 0xfff8) == 0x0130) -#define IS_CDV (dev) (((dev)->pdev->device & 0xfff0) == 0x0be0) +#define IS_PSB (drm) ((to_pci_dev((drm)->dev)->device & 0xfffe) == 0x8108) +#define IS_MRST (drm) ((to_pci_dev((drm)->dev)->device & 0xfff0) == 0x4100) +#define IS_MFLD (drm) ((to_pci_dev((drm)->dev)->device & 0xfff8) == 0x0130) +#define IS_CDV (drm) ((to_pci_dev((drm)->dev)->device & 0xfff0) == 0x0be0)/* Hardware offsets */ #define PSB_VDC_OFFSET 0x00000000
drivers/gpu/drm/gma500/psb_intel_lvds.c +3 -3
@@ -216,7 +216,7 @@ static void psb_intel_lvds_set_power(struct drm_device *dev, bool on)dev_err (dev->dev,"set power, chip off!\n" );return ; } - +if (on) {REG_WRITE (PP_CONTROL ,REG_READ (PP_CONTROL ) |POWER_TARGET_ON );
@@ -700,7 +700,7 @@ void psb_intel_lvds_init(struct drm_device *dev, lvds_priv->i2c_bus =psb_intel_i2c_create (dev,GPIOB ,"LVDSBLC_B" );if (!lvds_priv->i2c_bus) {dev_printk (KERN_ERR , - &dev->pdev->dev,"I2C bus registration failed.\n" ); + dev->dev,"I2C bus registration failed.\n" ); goto failed_blc_i2c; } lvds_priv->i2c_bus->slave_addr =0x2C ;
@@ -719,7 +719,7 @@ void psb_intel_lvds_init(struct drm_device *dev,/* Set up the DDC bus. */ lvds_priv->ddc_bus =psb_intel_i2c_create (dev,GPIOC ,"LVDSDDC_C" );if (!lvds_priv->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev, +dev_printk (KERN_ERR , dev->dev,"DDC bus registration " "failed.\n" ); goto failed_ddc; }
drivers/gpu/drm/gma500/psb_intel_sdvo.c +1 -1
@@ -2406,7 +2406,7 @@ psb_intel_sdvo_init_ddc_proxy(struct psb_intel_sdvo *sdvo, sdvo->ddc.owner =THIS_MODULE ; sdvo->ddc.class =I2C_CLASS_DDC ;snprintf (sdvo->ddc.name,I2C_NAME_SIZE ,"SDVO DDC proxy" ); - sdvo->ddc.dev.parent = &dev->pdev->dev; + sdvo->ddc.dev.parent = dev->dev; sdvo->ddc.algo_data = sdvo; sdvo->ddc.algo = &psb_intel_sdvo_ddc_proxy;
drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c +18 -18
@@ -454,13 +454,13 @@ static void tc35876x_brightness_init(struct drm_device *dev) ret =intel_scu_ipc_ioread8 (GPIOPWMCTRL , &pwmctrl);if (ret || pwmctrl !=0x01 ) {if (ret) -dev_err (&dev->pdev->dev,"GPIOPWMCTRL read failed\n" ); +dev_err (dev->dev,"GPIOPWMCTRL read failed\n" );else -dev_warn (&dev->pdev->dev,"GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n" , pwmctrl); +dev_warn (dev->dev,"GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n" , pwmctrl); ret =intel_scu_ipc_iowrite8 (GPIOPWMCTRL ,0x01 );if (ret) -dev_err (&dev->pdev->dev,"GPIOPWMCTRL set failed\n" ); +dev_err (dev->dev,"GPIOPWMCTRL set failed\n" ); } clkdiv =calc_clkdiv (SYSTEMCLK ,PWM_FREQUENCY );
@@ -470,9 +470,9 @@ static void tc35876x_brightness_init(struct drm_device *dev) ret =intel_scu_ipc_iowrite8 (PWM0CLKDIV0 , clkdiv &0xff );if (ret) -dev_err (&dev->pdev->dev,"PWM0CLKDIV set failed\n" ); +dev_err (dev->dev,"PWM0CLKDIV set failed\n" );else -dev_dbg (&dev->pdev->dev,"PWM0CLKDIV set to 0x%04x (%d Hz)\n" , +dev_dbg (dev->dev,"PWM0CLKDIV set to 0x%04x (%d Hz)\n" , clkdiv,PWM_FREQUENCY ); }
@@ -575,7 +575,7 @@ static struct drm_display_mode *tc35876x_get_config_mode(struct drm_device *dev) {struct drm_display_mode *mode; -dev_dbg (&dev->pdev->dev,"%s\n" , __func__); +dev_dbg (dev->dev,"%s\n" , __func__); mode =kzalloc (sizeof (*mode),GFP_KERNEL );if (!mode)
@@ -592,15 +592,15 @@ static struct drm_display_mode *tc35876x_get_config_mode(struct drm_device *dev) mode->vtotal =838 ; mode->clock =33324 <<1 ; -dev_info (&dev->pdev->dev,"hdisplay(w) = %d\n" , mode->hdisplay); -dev_info (&dev->pdev->dev,"vdisplay(h) = %d\n" , mode->vdisplay); -dev_info (&dev->pdev->dev,"HSS = %d\n" , mode->hsync_start); -dev_info (&dev->pdev->dev,"HSE = %d\n" , mode->hsync_end); -dev_info (&dev->pdev->dev,"htotal = %d\n" , mode->htotal); -dev_info (&dev->pdev->dev,"VSS = %d\n" , mode->vsync_start); -dev_info (&dev->pdev->dev,"VSE = %d\n" , mode->vsync_end); -dev_info (&dev->pdev->dev,"vtotal = %d\n" , mode->vtotal); -dev_info (&dev->pdev->dev,"clock = %d\n" , mode->clock); +dev_info (dev->dev,"hdisplay(w) = %d\n" , mode->hdisplay); +dev_info (dev->dev,"vdisplay(h) = %d\n" , mode->vdisplay); +dev_info (dev->dev,"HSS = %d\n" , mode->hsync_start); +dev_info (dev->dev,"HSE = %d\n" , mode->hsync_end); +dev_info (dev->dev,"htotal = %d\n" , mode->htotal); +dev_info (dev->dev,"VSS = %d\n" , mode->vsync_start); +dev_info (dev->dev,"VSE = %d\n" , mode->vsync_end); +dev_info (dev->dev,"vtotal = %d\n" , mode->vtotal); +dev_info (dev->dev,"clock = %d\n" , mode->clock);drm_mode_set_name (mode);drm_mode_set_crtcinfo (mode,0 );
@@ -775,19 +775,19 @@ void tc35876x_init(struct drm_device *dev) {int r; -dev_dbg (&dev->pdev->dev,"%s\n" , __func__); +dev_dbg (dev->dev,"%s\n" , __func__);cmi_lcd_hack_create_device (); r =i2c_add_driver (&cmi_lcd_i2c_driver);if (r <0 ) -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"%s: i2c_add_driver() for %s failed (%d)\n" , __func__, cmi_lcd_i2c_driver.driver.name, r); r =i2c_add_driver (&tc35876x_bridge_i2c_driver);if (r <0 ) -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"%s: i2c_add_driver() for %s failed (%d)\n" , __func__, tc35876x_bridge_i2c_driver.driver.name, r);
Signature · 1 line
2.29.2
Re: [PATCH 05/15] drm/gma500: Remove references to struct drm_device.pdev
Hi Thomas.
Quoted 5 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert gma500 to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Patrik Jakobsson <[email protected]>
This patch includes several whitespace changes too.
It would be nice to avoid these as the patch is already large enough.
Browsing the patch it was not so many, it looked like more in the start of the patch.
Sam
Quoted 848 lines
--- drivers/gpu/drm/gma500/cdv_device.c | 30 +++++++++++------- drivers/gpu/drm/gma500/cdv_intel_crt.c | 3 +- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 4 +-- drivers/gpu/drm/gma500/framebuffer.c | 9 +++--- drivers/gpu/drm/gma500/gma_device.c | 3 +- drivers/gpu/drm/gma500/gma_display.c | 4 +-- drivers/gpu/drm/gma500/gtt.c | 20 ++++++------ drivers/gpu/drm/gma500/intel_bios.c | 6 ++-- drivers/gpu/drm/gma500/intel_gmbus.c | 4 +-- drivers/gpu/drm/gma500/intel_i2c.c | 2 +- drivers/gpu/drm/gma500/mdfld_device.c | 4 ++- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 8 ++--- drivers/gpu/drm/gma500/mid_bios.c | 9 ++++-- drivers/gpu/drm/gma500/oaktrail_device.c | 5 +-- drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 2 +- drivers/gpu/drm/gma500/opregion.c | 3 +- drivers/gpu/drm/gma500/power.c | 13 ++++---- drivers/gpu/drm/gma500/psb_drv.c | 16 +++++----- drivers/gpu/drm/gma500/psb_drv.h | 8 ++--- drivers/gpu/drm/gma500/psb_intel_lvds.c | 6 ++-- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 36 +++++++++++----------- 23 files changed, 109 insertions(+), 90 deletions(-)drivers/gpu/drm/gma500/cdv_device.c +19
-11@@ -95,13 +95,14 @@ static u32 cdv_get_max_backlight(struct drm_device *dev)static int cdv_get_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 val =REG_READ (BLC_PWM_CTL ) &BACKLIGHT_DUTY_CYCLE_MASK ;if (cdv_backlight_combination_mode (dev)) {u8 lbpc; val &= ~1 ; -pci_read_config_byte (dev->pdev,0xF4 , &lbpc); +pci_read_config_byte (pdev,0xF4 , &lbpc); val *= lbpc; }return (val *100 )/cdv_get_max_backlight (dev);@@ -111,6 +112,7 @@ static int cdv_get_brightness(struct backlight_device *bd)static int cdv_set_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); +struct pci_dev *pdev =to_pci_dev (dev->dev);int level = bd->props.brightness;u32 blc_pwm_ctl;@@ -128,7 +130,7 @@ static int cdv_set_brightness(struct backlight_device *bd) lbpc = level *0xfe / max +1 ; level /= lbpc; -pci_write_config_byte (dev->pdev,0xF4 , lbpc); +pci_write_config_byte (pdev,0xF4 , lbpc); } blc_pwm_ctl =REG_READ (BLC_PWM_CTL ) & ~BACKLIGHT_DUTY_CYCLE_MASK ;@@ -205,8 +207,9 @@ static inline void CDV_MSG_WRITE32(int domain, uint port, uint offset,static void cdv_init_pm (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 pwr_cnt; -int domain =pci_domain_nr (dev->pdev->bus); +int domain =pci_domain_nr (pdev->bus);int i; dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,@@ -234,6 +237,8 @@ static void cdv_init_pm(struct drm_device *dev)static void cdv_errata (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +/* Disable bonus launch. * CPU and GPU competes for memory and display misses updates and * flickers. Worst with dual core, dual displays. @@ -242,7 +247,7 @@ static void cdv_errata(struct drm_device *dev)* Bonus Launch to work around the issue, by degrading * performance. */ -CDV_MSG_WRITE32 (pci_domain_nr (dev->pdev->bus),3 ,0x30 ,0x08027108 ); +CDV_MSG_WRITE32 (pci_domain_nr (pdev->bus),3 ,0x30 ,0x08027108 ); }/** @@ -255,12 +260,13 @@ static void cdv_errata(struct drm_device *dev)static int cdv_save_display_registers (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_save_area *regs = &dev_priv->regs;struct drm_connector *connector;dev_dbg (dev->dev,"Saving GPU registers.\n" ); -pci_read_config_byte (dev->pdev,0xF4 , ®s->cdv.saveLBB); +pci_read_config_byte (pdev,0xF4 , ®s->cdv.saveLBB); regs->cdv.saveDSPCLK_GATE_D =REG_READ (DSPCLK_GATE_D ); regs->cdv.saveRAMCLK_GATE_D =REG_READ (RAMCLK_GATE_D );@@ -309,11 +315,12 @@ static int cdv_save_display_registers(struct drm_device *dev)static int cdv_restore_display_registers (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_save_area *regs = &dev_priv->regs;struct drm_connector *connector;u32 temp; -pci_write_config_byte (dev->pdev,0xF4 , regs->cdv.saveLBB); +pci_write_config_byte (pdev,0xF4 , regs->cdv.saveLBB);REG_WRITE (DSPCLK_GATE_D , regs->cdv.saveDSPCLK_GATE_D);REG_WRITE (RAMCLK_GATE_D , regs->cdv.saveRAMCLK_GATE_D);@@ -421,16 +428,16 @@ static int cdv_power_up(struct drm_device *dev)static void cdv_hotplug_work_func (struct work_struct *work) { struct drm_psb_private *dev_priv = container_of(work, struct drm_psb_private, - hotplug_work); + hotplug_work);struct drm_device *dev = dev_priv->dev;/* Just fire off a uevent and let userspace tell us what to do */ drm_helper_hpd_irq_event (dev); -} +}/* The core driver has received a hotplug IRQ. We are in IRQ context so extract the needed information and kick off queued processing */ - +static int cdv_hotplug_event (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;@@ -449,7 +456,7 @@ static void cdv_hotplug_enable(struct drm_device *dev, bool on) }else {REG_WRITE (PORT_HOTPLUG_EN ,0 );REG_WRITE (PORT_HOTPLUG_STAT ,REG_READ (PORT_HOTPLUG_STAT )); - } + } }static const char *force_audio_names[] = {@@ -568,9 +575,10 @@ static const struct psb_offset cdv_regmap[2] = {static int cdv_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);INIT_WORK (&dev_priv->hotplug_work, cdv_hotplug_work_func); -if (pci_enable_msi (dev->pdev)) +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = cdv_regmap;gma_get_core_freq (dev);drivers/gpu/drm/gma500/cdv_intel_crt.c +1
-2@@ -278,8 +278,7 @@ void cdv_intel_crt_init(struct drm_device *dev, gma_encoder->ddc_bus =psb_intel_i2c_create (dev, i2c_reg,"CRTDDC_A" );if (!gma_encoder->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev,"DDC bus registration " -"failed.\n" ); +dev_printk (KERN_ERR , dev->dev,"DDC bus registration failed.\n" ); goto failed_ddc; }drivers/gpu/drm/gma500/cdv_intel_lvds.c +2
-2@@ -554,7 +554,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, "LVDSBLC_B");if (!gma_encoder->i2c_bus) {dev_printk (KERN_ERR , - &dev->pdev->dev,"I2C bus registration failed.\n" ); + dev->dev,"I2C bus registration failed.\n" ); goto failed_blc_i2c; } gma_encoder->i2c_bus->slave_addr =0x2C ;@@ -575,7 +575,7 @@ void cdv_intel_lvds_init(struct drm_device *dev,GPIOC , "LVDSDDC_C");if (!gma_encoder->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev, +dev_printk (KERN_ERR , dev->dev,"DDC bus registration " "failed.\n" ); goto failed_ddc; }drivers/gpu/drm/gma500/framebuffer.c +5
-4@@ -262,6 +262,7 @@ static int psbfb_create(struct drm_fb_helper *fb_helper, {struct drm_device *dev = fb_helper->dev;struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct fb_info *info;struct drm_framebuffer *fb;struct drm_mode_fb_cmd2 mode_cmd;@@ -325,8 +326,8 @@ static int psbfb_create(struct drm_fb_helper *fb_helper,drm_fb_helper_fill_info (info, fb_helper, sizes); - info->fix.mmio_start =pci_resource_start (dev->pdev,0 ); - info->fix.mmio_len =pci_resource_len (dev->pdev,0 ); + info->fix.mmio_start =pci_resource_start (pdev,0 ); + info->fix.mmio_len =pci_resource_len (pdev,0 );/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ @@ -529,6 +530,7 @@ void psb_modeset_init(struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;struct psb_intel_mode_device *mode_dev = &dev_priv->mode_dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);int i;drm_mode_config_init (dev);@@ -540,8 +542,7 @@ void psb_modeset_init(struct drm_device *dev)/* set memory base */ /* Oaktrail and Poulsbo should use BAR 2*/ -pci_read_config_dword (dev->pdev,PSB_BSM , (u32 *) - &(dev->mode_config.fb_base)); +pci_read_config_dword (pdev,PSB_BSM , (u32 *)&(dev->mode_config.fb_base));/* num pipes is 2 for PSB but 1 for Mrst */ for (i =0 ; i < dev_priv->num_pipe; i++)drivers/gpu/drm/gma500/gma_device.c +2
-1@@ -10,8 +10,9 @@void gma_get_core_freq (struct drm_device *dev) {uint32_t clock; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct pci_dev *pci_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,0 );struct drm_psb_private *dev_priv = dev->dev_private;drivers/gpu/drm/gma500/gma_display.c +2
-2@@ -559,9 +559,9 @@ int gma_crtc_set_config(struct drm_mode_set *set,if (!dev_priv->rpm_enabled)return drm_crtc_helper_set_config (set, ctx); -pm_runtime_forbid (&dev->pdev->dev); +pm_runtime_forbid (dev->dev); ret =drm_crtc_helper_set_config (set, ctx); -pm_runtime_allow (&dev->pdev->dev); +pm_runtime_allow (dev->dev);return ret; }drivers/gpu/drm/gma500/gtt.c +11
-9@@ -340,13 +340,14 @@ static void psb_gtt_alloc(struct drm_device *dev)void psb_gtt_takedown (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);if (dev_priv->gtt_map) {iounmap (dev_priv->gtt_map); dev_priv->gtt_map =NULL ; }if (dev_priv->gtt_initialized) { -pci_write_config_word (dev->pdev,PSB_GMCH_CTRL , +pci_write_config_word (pdev,PSB_GMCH_CTRL , dev_priv->gmch_ctrl);PSB_WVDC32 (dev_priv->pge_ctl,PSB_PGETBL_CTL ); (void )PSB_RVDC32 (PSB_PGETBL_CTL );@@ -358,6 +359,7 @@ void psb_gtt_takedown(struct drm_device *dev)int psb_gtt_init (struct drm_device *dev,int resume) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);unsigned gtt_pages;unsigned long stolen_size, vram_stolen_size;unsigned i, num_pages;@@ -376,8 +378,8 @@ int psb_gtt_init(struct drm_device *dev, int resume) pg = &dev_priv->gtt;/* Enable the GTT */ -pci_read_config_word (dev->pdev,PSB_GMCH_CTRL , &dev_priv->gmch_ctrl); -pci_write_config_word (dev->pdev,PSB_GMCH_CTRL , +pci_read_config_word (pdev,PSB_GMCH_CTRL , &dev_priv->gmch_ctrl); +pci_write_config_word (pdev,PSB_GMCH_CTRL , dev_priv->gmch_ctrl | _PSB_GMCH_ENABLED); dev_priv->pge_ctl =PSB_RVDC32 (PSB_PGETBL_CTL );@@ -397,8 +399,8 @@ int psb_gtt_init(struct drm_device *dev, int resume)*/ pg->mmu_gatt_start =0xE0000000 ; - pg->gtt_start =pci_resource_start (dev->pdev,PSB_GTT_RESOURCE ); - gtt_pages =pci_resource_len (dev->pdev,PSB_GTT_RESOURCE ) + pg->gtt_start =pci_resource_start (pdev,PSB_GTT_RESOURCE ); + gtt_pages =pci_resource_len (pdev,PSB_GTT_RESOURCE ) >>PAGE_SHIFT ;/* CDV doesn't report this. In which case the system has 64 gtt pages */ if (pg->gtt_start ==0 || gtt_pages ==0 ) {@@ -407,10 +409,10 @@ int psb_gtt_init(struct drm_device *dev, int resume) pg->gtt_start = dev_priv->pge_ctl; } - pg->gatt_start =pci_resource_start (dev->pdev,PSB_GATT_RESOURCE ); - pg->gatt_pages =pci_resource_len (dev->pdev,PSB_GATT_RESOURCE ) + pg->gatt_start =pci_resource_start (pdev,PSB_GATT_RESOURCE ); + pg->gatt_pages =pci_resource_len (pdev,PSB_GATT_RESOURCE ) >>PAGE_SHIFT ; - dev_priv->gtt_mem = &dev->pdev->resource[PSB_GATT_RESOURCE ]; + dev_priv->gtt_mem = &pdev->resource[PSB_GATT_RESOURCE ];if (pg->gatt_pages ==0 || pg->gatt_start ==0 ) {static struct resource fudge;/* Preferably peppermint */ @@ -431,7 +433,7 @@ int psb_gtt_init(struct drm_device *dev, int resume) dev_priv->gtt_mem = &fudge; } -pci_read_config_dword (dev->pdev,PSB_BSM , &dev_priv->stolen_base); +pci_read_config_dword (pdev,PSB_BSM , &dev_priv->stolen_base); vram_stolen_size = pg->gtt_phys_start - dev_priv->stolen_base -PAGE_SIZE ;drivers/gpu/drm/gma500/intel_bios.c +3
-3@@ -50,7 +50,7 @@ parse_edp(struct drm_psb_private *dev_priv, struct bdb_header *bdb)uint8_t panel_type; edp =find_section (bdb,BDB_EDP ); - + dev_priv->edp.bpp =18 ;if (!edp) {if (dev_priv->edp.support) {@@ -80,7 +80,7 @@ parse_edp(struct drm_psb_private *dev_priv, struct bdb_header *bdb) dev_priv->edp.pps = *edp_pps;DRM_DEBUG_KMS ("EDP timing in vbt t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n" , - dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, + dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, dev_priv->edp.pps.t9, dev_priv->edp.pps.t10, dev_priv->edp.pps.t11_t12);@@ -516,7 +516,7 @@ parse_device_mapping(struct drm_psb_private *dev_priv,int psb_intel_init_bios (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; -struct pci_dev *pdev = dev->pdev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct vbt_header *vbt =NULL ;struct bdb_header *bdb =NULL ;u8 __iomem *bios =NULL ;drivers/gpu/drm/gma500/intel_gmbus.c +2
-2@@ -196,7 +196,7 @@ intel_gpio_create(struct drm_psb_private *dev_priv, u32 pin) "gma500 GPIO%c", "?BACDE?F"[pin]); gpio->adapter.owner =THIS_MODULE ; gpio->adapter.algo_data = &gpio->algo; - gpio->adapter.dev.parent = &dev_priv->dev->pdev->dev; + gpio->adapter.dev.parent = dev_priv->dev->dev; gpio->algo.setsda = set_data; gpio->algo.setscl = set_clock; gpio->algo.getsda = get_data;@@ -417,7 +417,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)"gma500 gmbus %s" , names[i]); - bus->adapter.dev.parent = &dev->pdev->dev; + bus->adapter.dev.parent = dev->dev; bus->adapter.algo_data = dev_priv; bus->adapter.algo = &gmbus_algorithm;drivers/gpu/drm/gma500/intel_i2c.c +1
-1@@ -117,7 +117,7 @@ struct psb_intel_i2c_chan *psb_intel_i2c_create(struct drm_device *dev,snprintf (chan->adapter.name,I2C_NAME_SIZE ,"intel drm %s" , name); chan->adapter.owner =THIS_MODULE ; chan->adapter.algo_data = &chan->algo; - chan->adapter.dev.parent = &dev->pdev->dev; + chan->adapter.dev.parent = dev->dev; chan->algo.setsda = set_data; chan->algo.setscl = set_clock; chan->algo.getsda = get_data;drivers/gpu/drm/gma500/mdfld_device.c +3
-1@@ -523,7 +523,9 @@ static struct gpiod_lookup_table mdfld_dsi_pipe_gpio_table = {static int mdfld_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; -if (pci_enable_msi (dev->pdev)) +struct pci_dev *pdev =to_pci_dev (dev->dev); + +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = mdfld_regmap;drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +4
-4@@ -138,7 +138,7 @@ static void dsi_set_pipe_plane_enable_state(struct drm_device *dev,REG_WRITE (pipeconf_reg,BIT (31 ));if (REG_BIT_WAIT (pipeconf_reg,1 ,30 )) -dev_err (&dev->pdev->dev,"%s: Pipe enable timeout\n" , +dev_err (dev->dev,"%s: Pipe enable timeout\n" , __func__);/*Set up display plane */ @@ -165,11 +165,11 @@ static void dsi_set_pipe_plane_enable_state(struct drm_device *dev,REG_FLD_MOD (pipeconf_reg,0 ,31 ,31 );if (REG_BIT_WAIT (pipeconf_reg,0 ,30 )) -dev_err (&dev->pdev->dev,"%s: Pipe disable timeout\n" , +dev_err (dev->dev,"%s: Pipe disable timeout\n" , __func__);if (REG_BIT_WAIT (MIPI_GEN_FIFO_STAT_REG (pipe),1 ,28 )) -dev_err (&dev->pdev->dev,"%s: FIFO not empty\n" , +dev_err (dev->dev,"%s: FIFO not empty\n" , __func__); } }@@ -867,7 +867,7 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,REG_WRITE (MRST_DPLL_A ,0x80800000 );if (REG_BIT_WAIT (pipeconf_reg,1 ,29 )) -dev_err (&dev->pdev->dev,"%s: DSI PLL lock timeout\n" , +dev_err (dev->dev,"%s: DSI PLL lock timeout\n" , __func__);REG_WRITE (MIPI_DPHY_PARAM_REG (pipe),0x2A0c6008 );drivers/gpu/drm/gma500/mid_bios.c +6
-3@@ -19,8 +19,9 @@static void mid_get_fuse_settings (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct pci_dev *pci_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,0 );uint32_t fuse_value =0 ;uint32_t fuse_value_tmp =0 ;@@ -93,7 +94,8 @@ static void mid_get_fuse_settings(struct drm_device *dev)static void mid_get_pci_revID (struct drm_psb_private *dev_priv) {uint32_t platform_rev_id =0 ; -int domain =pci_domain_nr (dev_priv->dev->pdev->bus); +struct pci_dev *pdev =to_pci_dev (dev_priv->dev->dev); +int domain =pci_domain_nr (pdev->bus);struct pci_dev *pci_gfx_root =pci_get_domain_bus_and_slot (domain,0 ,PCI_DEVFN (2 ,0 ));@@ -269,11 +271,12 @@ static int mid_get_vbt_data_r10(struct drm_psb_private *dev_priv, u32 addr)static void mid_get_vbt_data (struct drm_psb_private *dev_priv) {struct drm_device *dev = dev_priv->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 addr;u8 __iomem *vbt_virtual;struct mid_vbt_header vbt_header;struct pci_dev *pci_gfx_root = -pci_get_domain_bus_and_slot (pci_domain_nr (dev->pdev->bus), +pci_get_domain_bus_and_slot (pci_domain_nr (pdev->bus),0 ,PCI_DEVFN (2 ,0 ));int ret =-1 ;drivers/gpu/drm/gma500/oaktrail_device.c +3
-2@@ -504,9 +504,10 @@ static const struct psb_offset oaktrail_regmap[2] = {static int oaktrail_chip_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);int ret; - -if (pci_enable_msi (dev->pdev)) + +if (pci_enable_msi (pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" ); dev_priv->regmap = oaktrail_regmap;drivers/gpu/drm/gma500/oaktrail_lvds.c +1
-1@@ -60,7 +60,7 @@ static void oaktrail_lvds_set_power(struct drm_device *dev, pp_status =REG_READ (PP_STATUS ); }while (pp_status &PP_ON ); dev_priv->is_lvds_on = false; -pm_request_idle (&dev->pdev->dev); +pm_request_idle (dev->dev); }gma_power_end (dev); }drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c +1
-1@@ -145,7 +145,7 @@ void oaktrail_lvds_i2c_init(struct drm_encoder *encoder)strncpy (chan->adapter.name,"gma500 LPC" ,I2C_NAME_SIZE -1 ); chan->adapter.owner =THIS_MODULE ; chan->adapter.algo_data = &chan->algo; - chan->adapter.dev.parent = &dev->pdev->dev; + chan->adapter.dev.parent = dev->dev; chan->algo.setsda = set_data; chan->algo.setscl = set_clock; chan->algo.getsda = get_data;drivers/gpu/drm/gma500/opregion.c +2
-1@@ -305,12 +305,13 @@ void psb_intel_opregion_fini(struct drm_device *dev)int psb_intel_opregion_setup (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct psb_intel_opregion *opregion = &dev_priv->opregion;u32 opregion_phy, mboxes;void __iomem *base;int err =0 ; -pci_read_config_dword (dev->pdev,PCI_ASLS , &opregion_phy); +pci_read_config_dword (pdev,PCI_ASLS , &opregion_phy);if (opregion_phy ==0 ) {DRM_DEBUG_DRIVER ("ACPI Opregion not supported\n" );return -ENOTSUPP ;drivers/gpu/drm/gma500/power.c +7
-6@@ -70,8 +70,8 @@ void gma_power_init(struct drm_device *dev)*/ void gma_power_uninit (struct drm_device *dev) { -pm_runtime_disable (&dev->pdev->dev); -pm_runtime_set_suspended (&dev->pdev->dev); +pm_runtime_disable (dev->dev); +pm_runtime_set_suspended (dev->dev); }/** @@ -249,6 +249,7 @@ bool gma_power_is_on(struct drm_device *dev)bool gma_power_begin (struct drm_device *dev,bool force_on) {struct drm_psb_private *dev_priv = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);int ret;unsigned long flags;@@ -256,7 +257,7 @@ bool gma_power_begin(struct drm_device *dev, bool force_on)/* Power already on ? */ if (dev_priv->display_power) { dev_priv->display_count++; -pm_runtime_get (&dev->pdev->dev); +pm_runtime_get (dev->dev);spin_unlock_irqrestore (&power_ctrl_lock, flags);return true; }@@ -264,11 +265,11 @@ bool gma_power_begin(struct drm_device *dev, bool force_on) goto out_false;/* Ok power up needed */ - ret =gma_resume_pci (dev->pdev); + ret =gma_resume_pci (pdev);if (ret ==0 ) {psb_irq_preinstall (dev);psb_irq_postinstall (dev); -pm_runtime_get (&dev->pdev->dev); +pm_runtime_get (dev->dev); dev_priv->display_count++;spin_unlock_irqrestore (&power_ctrl_lock, flags);return true;@@ -293,7 +294,7 @@ void gma_power_end(struct drm_device *dev) dev_priv->display_count--;WARN_ON (dev_priv->display_count <0 );spin_unlock_irqrestore (&power_ctrl_lock, flags); -pm_runtime_put (&dev->pdev->dev); +pm_runtime_put (dev->dev); }int psb_runtime_suspend (struct device *dev)drivers/gpu/drm/gma500/psb_drv.c +8
-8@@ -208,6 +208,7 @@ static void psb_driver_unload(struct drm_device *dev)static int psb_driver_load (struct drm_device *dev,unsigned long flags) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_psb_private *dev_priv;unsigned long resource_start, resource_len;unsigned long irqflags;@@ -227,11 +228,11 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) pg = &dev_priv->gtt; -pci_set_master (dev->pdev); +pci_set_master (pdev); dev_priv->num_pipe = dev_priv->ops->pipes; - resource_start =pci_resource_start (dev->pdev,PSB_MMIO_RESOURCE ); + resource_start =pci_resource_start (pdev,PSB_MMIO_RESOURCE ); dev_priv->vdc_reg =ioremap (resource_start +PSB_VDC_OFFSET ,PSB_VDC_SIZE );@@ -244,7 +245,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags) goto out_err;if (IS_MRST (dev)) { -int domain =pci_domain_nr (dev->pdev->bus); +int domain =pci_domain_nr (pdev->bus); dev_priv->aux_pdev = pci_get_domain_bus_and_slot(domain, 0,@@ -359,7 +360,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)PSB_WVDC32 (0xFFFFFFFF ,PSB_INT_MASK_R );spin_unlock_irqrestore (&dev_priv->irqmask_lock, irqflags); -drm_irq_install (dev, dev->pdev->irq); +drm_irq_install (dev, pdev->irq); dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ @@ -385,8 +386,8 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)psb_intel_opregion_enable_asle (dev);#if 0 /* Enable runtime pm at last */ -pm_runtime_enable (&dev->pdev->dev); -pm_runtime_set_active (&dev->pdev->dev); +pm_runtime_enable (dev->dev); +pm_runtime_set_active (dev->dev);#endif /* Intel drm driver load is done, continue doing pvr load */ return 0 ;@@ -415,7 +416,7 @@ static long psb_unlocked_ioctl(struct file *filp, unsigned int cmd,if (runtime_allowed ==1 && dev_priv->is_lvds_on) { runtime_allowed++; -pm_runtime_allow (&dev->pdev->dev); +pm_runtime_allow (dev->dev); dev_priv->rpm_enabled =1 ; }return drm_ioctl (filp, cmd, arg);@@ -437,7 +438,6 @@ static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_pci_disable_device; } - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =psb_driver_load (dev, ent->driver_data);drivers/gpu/drm/gma500/psb_drv.h +4
-4@@ -43,10 +43,10 @@ enum { CHIP_MFLD_0130 = 3, /* Medfield */ }; -#define IS_PSB (dev) (((dev)->pdev->device & 0xfffe) == 0x8108) -#define IS_MRST (dev) (((dev)->pdev->device & 0xfff0) == 0x4100) -#define IS_MFLD (dev) (((dev)->pdev->device & 0xfff8) == 0x0130) -#define IS_CDV (dev) (((dev)->pdev->device & 0xfff0) == 0x0be0) +#define IS_PSB (drm) ((to_pci_dev((drm)->dev)->device & 0xfffe) == 0x8108) +#define IS_MRST (drm) ((to_pci_dev((drm)->dev)->device & 0xfff0) == 0x4100) +#define IS_MFLD (drm) ((to_pci_dev((drm)->dev)->device & 0xfff8) == 0x0130) +#define IS_CDV (drm) ((to_pci_dev((drm)->dev)->device & 0xfff0) == 0x0be0)/* Hardware offsets */ #define PSB_VDC_OFFSET 0x00000000drivers/gpu/drm/gma500/psb_intel_lvds.c +3
-3@@ -216,7 +216,7 @@ static void psb_intel_lvds_set_power(struct drm_device *dev, bool on)dev_err (dev->dev,"set power, chip off!\n" );return ; } - +if (on) {REG_WRITE (PP_CONTROL ,REG_READ (PP_CONTROL ) |POWER_TARGET_ON );@@ -700,7 +700,7 @@ void psb_intel_lvds_init(struct drm_device *dev, lvds_priv->i2c_bus =psb_intel_i2c_create (dev,GPIOB ,"LVDSBLC_B" );if (!lvds_priv->i2c_bus) {dev_printk (KERN_ERR , - &dev->pdev->dev,"I2C bus registration failed.\n" ); + dev->dev,"I2C bus registration failed.\n" ); goto failed_blc_i2c; } lvds_priv->i2c_bus->slave_addr =0x2C ;@@ -719,7 +719,7 @@ void psb_intel_lvds_init(struct drm_device *dev,/* Set up the DDC bus. */ lvds_priv->ddc_bus =psb_intel_i2c_create (dev,GPIOC ,"LVDSDDC_C" );if (!lvds_priv->ddc_bus) { -dev_printk (KERN_ERR , &dev->pdev->dev, +dev_printk (KERN_ERR , dev->dev,"DDC bus registration " "failed.\n" ); goto failed_ddc; }drivers/gpu/drm/gma500/psb_intel_sdvo.c +1
-1@@ -2406,7 +2406,7 @@ psb_intel_sdvo_init_ddc_proxy(struct psb_intel_sdvo *sdvo, sdvo->ddc.owner =THIS_MODULE ; sdvo->ddc.class =I2C_CLASS_DDC ;snprintf (sdvo->ddc.name,I2C_NAME_SIZE ,"SDVO DDC proxy" ); - sdvo->ddc.dev.parent = &dev->pdev->dev; + sdvo->ddc.dev.parent = dev->dev; sdvo->ddc.algo_data = sdvo; sdvo->ddc.algo = &psb_intel_sdvo_ddc_proxy;drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c +18
-18@@ -454,13 +454,13 @@ static void tc35876x_brightness_init(struct drm_device *dev) ret =intel_scu_ipc_ioread8 (GPIOPWMCTRL , &pwmctrl);if (ret || pwmctrl !=0x01 ) {if (ret) -dev_err (&dev->pdev->dev,"GPIOPWMCTRL read failed\n" ); +dev_err (dev->dev,"GPIOPWMCTRL read failed\n" );else -dev_warn (&dev->pdev->dev,"GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n" , pwmctrl); +dev_warn (dev->dev,"GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n" , pwmctrl); ret =intel_scu_ipc_iowrite8 (GPIOPWMCTRL ,0x01 );if (ret) -dev_err (&dev->pdev->dev,"GPIOPWMCTRL set failed\n" ); +dev_err (dev->dev,"GPIOPWMCTRL set failed\n" ); } clkdiv =calc_clkdiv (SYSTEMCLK ,PWM_FREQUENCY );@@ -470,9 +470,9 @@ static void tc35876x_brightness_init(struct drm_device *dev) ret =intel_scu_ipc_iowrite8 (PWM0CLKDIV0 , clkdiv &0xff );if (ret) -dev_err (&dev->pdev->dev,"PWM0CLKDIV set failed\n" ); +dev_err (dev->dev,"PWM0CLKDIV set failed\n" );else -dev_dbg (&dev->pdev->dev,"PWM0CLKDIV set to 0x%04x (%d Hz)\n" , +dev_dbg (dev->dev,"PWM0CLKDIV set to 0x%04x (%d Hz)\n" , clkdiv,PWM_FREQUENCY ); }@@ -575,7 +575,7 @@ static struct drm_display_mode *tc35876x_get_config_mode(struct drm_device *dev) {struct drm_display_mode *mode; -dev_dbg (&dev->pdev->dev,"%s\n" , __func__); +dev_dbg (dev->dev,"%s\n" , __func__); mode =kzalloc (sizeof (*mode),GFP_KERNEL );if (!mode)@@ -592,15 +592,15 @@ static struct drm_display_mode *tc35876x_get_config_mode(struct drm_device *dev) mode->vtotal =838 ; mode->clock =33324 <<1 ; -dev_info (&dev->pdev->dev,"hdisplay(w) = %d\n" , mode->hdisplay); -dev_info (&dev->pdev->dev,"vdisplay(h) = %d\n" , mode->vdisplay); -dev_info (&dev->pdev->dev,"HSS = %d\n" , mode->hsync_start); -dev_info (&dev->pdev->dev,"HSE = %d\n" , mode->hsync_end); -dev_info (&dev->pdev->dev,"htotal = %d\n" , mode->htotal); -dev_info (&dev->pdev->dev,"VSS = %d\n" , mode->vsync_start); -dev_info (&dev->pdev->dev,"VSE = %d\n" , mode->vsync_end); -dev_info (&dev->pdev->dev,"vtotal = %d\n" , mode->vtotal); -dev_info (&dev->pdev->dev,"clock = %d\n" , mode->clock); +dev_info (dev->dev,"hdisplay(w) = %d\n" , mode->hdisplay); +dev_info (dev->dev,"vdisplay(h) = %d\n" , mode->vdisplay); +dev_info (dev->dev,"HSS = %d\n" , mode->hsync_start); +dev_info (dev->dev,"HSE = %d\n" , mode->hsync_end); +dev_info (dev->dev,"htotal = %d\n" , mode->htotal); +dev_info (dev->dev,"VSS = %d\n" , mode->vsync_start); +dev_info (dev->dev,"VSE = %d\n" , mode->vsync_end); +dev_info (dev->dev,"vtotal = %d\n" , mode->vtotal); +dev_info (dev->dev,"clock = %d\n" , mode->clock);drm_mode_set_name (mode);drm_mode_set_crtcinfo (mode,0 );@@ -775,19 +775,19 @@ void tc35876x_init(struct drm_device *dev) {int r; -dev_dbg (&dev->pdev->dev,"%s\n" , __func__); +dev_dbg (dev->dev,"%s\n" , __func__);cmi_lcd_hack_create_device (); r =i2c_add_driver (&cmi_lcd_i2c_driver);if (r <0 ) -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"%s: i2c_add_driver() for %s failed (%d)\n" , __func__, cmi_lcd_i2c_driver.driver.name, r); r =i2c_add_driver (&tc35876x_bridge_i2c_driver);if (r <0 ) -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"%s: i2c_add_driver() for %s failed (%d)\n" , __func__, tc35876x_bridge_i2c_driver.driver.name, r);Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerPATCH 6/15 drm/hibmc: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert hibmc to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 +++++----- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +5 -5
@@ -203,7 +203,7 @@ static void hibmc_hw_config(struct hibmc_drm_private *priv)static int hibmc_hw_map (struct hibmc_drm_private *priv) {struct drm_device *dev = priv->dev; -struct pci_dev *pdev = dev->pdev; +struct pci_dev *pdev =to_pci_dev (dev->dev);resource_size_t addr, size, ioaddr, iosize; ioaddr =pci_resource_start (pdev,1 );
@@ -249,7 +249,7 @@ static int hibmc_unload(struct drm_device *dev)if (dev->irq_enabled)drm_irq_uninstall (dev); -pci_disable_msi (dev->pdev); +pci_disable_msi (to_pci_dev (dev->dev));hibmc_kms_fini (priv);hibmc_mm_fini (priv); dev->dev_private =NULL ;
@@ -258,6 +258,7 @@ static int hibmc_unload(struct drm_device *dev)static int hibmc_load (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct hibmc_drm_private *priv;int ret;
@@ -287,11 +288,11 @@ static int hibmc_load(struct drm_device *dev) goto err; } - ret =pci_enable_msi (dev->pdev); + ret =pci_enable_msi (pdev);if (ret) {drm_warn (dev,"enabling MSI failed: %d\n" , ret); }else { - ret =drm_irq_install (dev, dev->pdev->irq); + ret =drm_irq_install (dev, pdev->irq);if (ret)drm_warn (dev,"install irq failed: %d\n" , ret); }
@@ -324,7 +325,6 @@ static int hibmc_pci_probe(struct pci_dev *pdev,return PTR_ERR (dev); } - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =pci_enable_device (pdev);
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c +1 -1
@@ -83,7 +83,7 @@ int hibmc_ddc_create(struct drm_device *drm_dev, connector->adapter.owner =THIS_MODULE ; connector->adapter.class =I2C_CLASS_DDC ;snprintf (connector->adapter.name,I2C_NAME_SIZE ,"HIS i2c bit bus" ); - connector->adapter.dev.parent = &drm_dev->pdev->dev; + connector->adapter.dev.parent = drm_dev->dev;i2c_set_adapdata (&connector->adapter, connector); connector->adapter.algo_data = &connector->bit_data;
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c +2 -2
@@ -26,9 +26,9 @@ int hibmc_mm_init(struct hibmc_drm_private *hibmc)struct drm_vram_mm *vmm;int ret;struct drm_device *dev = hibmc->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev); - vmm =drm_vram_helper_alloc_mm (dev, -pci_resource_start (dev->pdev,0 ), + vmm =drm_vram_helper_alloc_mm (dev,pci_resource_start (pdev,0 ), hibmc->fb_size);if (IS_ERR (vmm)) { ret =PTR_ERR (vmm);
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 7/15 drm/i915: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/i915/display/intel_bios.c | 2 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++------- drivers/gpu/drm/i915/display/intel_csr.c | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +++-- drivers/gpu/drm/i915/display/intel_opregion.c | 6 +++--- drivers/gpu/drm/i915/display/intel_overlay.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++-- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vga.c | 8 ++++---- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 +++++----- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_rc6.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +++--- drivers/gpu/drm/i915/gvt/cfg_space.c | 5 +++-- drivers/gpu/drm/i915/gvt/firmware.c | 10 +++++----- drivers/gpu/drm/i915/gvt/gtt.c | 12 +++++------ drivers/gpu/drm/i915/gvt/gvt.c | 6 +++--- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++---------- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_getparam.c | 5 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 6 +++--- drivers/gpu/drm/i915/i915_pmu.c | 5 +++-- drivers/gpu/drm/i915/i915_suspend.c | 4 ++-- drivers/gpu/drm/i915/i915_switcheroo.c | 4 ++-- drivers/gpu/drm/i915/i915_vgpu.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_region_lmem.c | 8 ++++---- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- .../gpu/drm/i915/selftests/mock_gem_device.c | 1 - drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 +- 42 files changed, 99 insertions(+), 98 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +1 -1
@@ -2088,7 +2088,7 @@ bool intel_bios_is_valid_vbt(const void *buf, size_t size)static struct vbt_header *oprom_get_vbt (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);void __iomem *p =NULL , *oprom;struct vbt_header *vbt;u16 vbt_size;
drivers/gpu/drm/i915/display/intel_cdclk.c +7 -7
@@ -96,7 +96,7 @@ static void fixed_450mhz_get_cdclk(struct drm_i915_private *dev_priv,static void i85x_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 hpllcc =0 ;/*
@@ -138,7 +138,7 @@ static void i85x_get_cdclk(struct drm_i915_private *dev_priv,static void i915gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);
@@ -162,7 +162,7 @@ static void i915gm_get_cdclk(struct drm_i915_private *dev_priv,static void i945gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);
@@ -256,7 +256,7 @@ static unsigned int intel_hpll_vco(struct drm_i915_private *dev_priv)static void g33_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {12 ,10 ,8 ,7 ,5 ,16 };static const u8 div_4000[] = {14 ,12 ,10 ,8 ,6 ,20 };static const u8 div_4800[] = {20 ,14 ,12 ,10 ,8 ,24 };
@@ -305,7 +305,7 @@ static void g33_get_cdclk(struct drm_i915_private *dev_priv,static void pnv_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);
@@ -339,7 +339,7 @@ static void pnv_get_cdclk(struct drm_i915_private *dev_priv,static void i965gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {16 ,10 ,8 };static const u8 div_4000[] = {20 ,12 ,10 };static const u8 div_5333[] = {24 ,16 ,14 };
@@ -384,7 +384,7 @@ static void i965gm_get_cdclk(struct drm_i915_private *dev_priv,static void gm45_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);unsigned int cdclk_sel;u16 tmp =0 ;
drivers/gpu/drm/i915/display/intel_csr.c +1 -1
@@ -640,7 +640,7 @@ static void csr_load_work_fn(struct work_struct *work) dev_priv =container_of (work,typeof (*dev_priv), csr.work); csr = &dev_priv->csr; -request_firmware (&fw, dev_priv->csr.fw_path, &dev_priv->drm.pdev->dev); +request_firmware (&fw, dev_priv->csr.fw_path, dev_priv->drm.dev);parse_csr_fw (dev_priv, fw);if (dev_priv->csr.dmc_payload) {
drivers/gpu/drm/i915/display/intel_dsi_vbt.c +1 -1
@@ -425,7 +425,7 @@ static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi, const u16 slave_addr) {struct drm_device *drm_dev = intel_dsi->base.base.dev; -struct device *dev = &drm_dev->pdev->dev; +struct device *dev = drm_dev->dev;struct acpi_device *acpi_dev;struct list_head resource_list;struct i2c_adapter_lookup lookup;
drivers/gpu/drm/i915/display/intel_fbdev.c +1 -1
@@ -167,7 +167,7 @@ static int intelfb_create(struct drm_fb_helper *helper,struct intel_framebuffer *intel_fb = ifbdev->fb;struct drm_device *dev = helper->dev;struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct i915_ggtt *ggtt = &dev_priv->ggtt;const struct i915_ggtt_view view = { .type =I915_GGTT_VIEW_NORMAL ,
drivers/gpu/drm/i915/display/intel_gmbus.c +1 -1
@@ -840,7 +840,7 @@ static const struct i2c_lock_operations gmbus_lock_ops = {*/ int intel_gmbus_setup (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_gmbus *bus;unsigned int pin;int ret;
drivers/gpu/drm/i915/display/intel_lpe_audio.c +3 -2
@@ -80,6 +80,7 @@ static struct platform_device * lpe_audio_platdev_create(struct drm_i915_private *dev_priv) {struct drm_device *dev = &dev_priv->drm; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;
@@ -99,9 +100,9 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[0 ].flags =IORESOURCE_IRQ ; rsc[0 ].name ="hdmi-lpe-audio-irq" ; - rsc[1 ].start =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].start =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE ; - rsc[1 ].end =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].end =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE +I915_HDMI_LPE_AUDIO_SIZE -1 ; rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ;
drivers/gpu/drm/i915/display/intel_opregion.c +3 -3
@@ -247,7 +247,7 @@ static int swsci(struct drm_i915_private *dev_priv, u32 function, u32 parm, u32 *parm_out) { struct opregion_swsci *swsci = dev_priv->opregion.swsci; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 main_function, sub_function, scic;u16 swsci_val;u32 dslp;
@@ -807,7 +807,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)if (!name || !*name)return -ENOENT ; - ret =request_firmware (&fw, name, &dev_priv->drm.pdev->dev); + ret =request_firmware (&fw, name, dev_priv->drm.dev);if (ret) { drm_err(&dev_priv->drm, "Requesting VBT firmware \"%s\" failed (%d)\n",
@@ -840,7 +840,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)int intel_opregion_setup (struct drm_i915_private *dev_priv) {struct intel_opregion *opregion = &dev_priv->opregion; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 asls, mboxes;char buf[sizeof (OPREGION_SIGNATURE )];int err =0 ;
drivers/gpu/drm/i915/display/intel_overlay.c +1 -1
@@ -201,7 +201,7 @@ struct intel_overlay {static void i830_overlay_clock_gating (struct drm_i915_private *dev_priv,bool enable) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u8 val;/* WA_OVERLAY_CLKGATE:alm */
drivers/gpu/drm/i915/display/intel_panel.c +2 -2
@@ -557,7 +557,7 @@ static u32 i9xx_get_backlight(struct intel_connector *connector)if (panel->backlight.combination_mode) {u8 lbpc; -pci_read_config_byte (dev_priv->drm.pdev,LBPC , &lbpc); +pci_read_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , &lbpc); val *= lbpc; }
@@ -631,7 +631,7 @@ static void i9xx_set_backlight(const struct drm_connector_state *conn_state, u32 lbpc = level *0xfe / panel->backlight.max +1 ; level /= lbpc; -pci_write_config_byte (dev_priv->drm.pdev,LBPC , lbpc); +pci_write_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , lbpc); }if (IS_GEN (dev_priv,4 )) {
drivers/gpu/drm/i915/display/intel_quirks.c +1 -1
@@ -160,7 +160,7 @@ static struct intel_quirk intel_quirks[] = {void intel_init_quirks (struct drm_i915_private *i915) { -struct pci_dev *d = i915->drm.pdev; +struct pci_dev *d =to_pci_dev (i915->drm.dev);int i;for (i =0 ; i <ARRAY_SIZE (intel_quirks); i++) {
drivers/gpu/drm/i915/display/intel_sdvo.c +1 -1
@@ -3281,7 +3281,7 @@ static bool intel_sdvo_init_ddc_proxy(struct intel_sdvo *sdvo, struct drm_i915_private *dev_priv) { - struct pci_dev *pdev = dev_priv->drm.pdev; + struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); sdvo->ddc.owner =THIS_MODULE ; sdvo->ddc.class =I2C_CLASS_DDC ;
drivers/gpu/drm/i915/display/intel_vga.c +4 -4
@@ -25,7 +25,7 @@ static i915_reg_t intel_vga_cntrl_reg(struct drm_i915_private *i915)/* Disable the VGA plane that we never use */ void intel_vga_disable (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_reg_t vga_reg =intel_vga_cntrl_reg (dev_priv);u8 sr1;
@@ -76,7 +76,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)void intel_vga_reset_io_mem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* * After we re-enable the power well, if we touch VGA register 0x3d5
@@ -136,7 +136,7 @@ intel_vga_set_decode(void *cookie, bool enable_decode)int intel_vga_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int ret;/*
@@ -156,7 +156,7 @@ int intel_vga_register(struct drm_i915_private *i915)void intel_vga_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_client_register (pdev,NULL ,NULL ,NULL ); }
drivers/gpu/drm/i915/gem/i915_gem_phys.c +3 -3
@@ -35,7 +35,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)* to handle all possible callers, and given typical object sizes, * the alignment of the buddy allocation will naturally match. */ - vaddr =dma_alloc_coherent (&obj->base.dev->pdev->dev, + vaddr =dma_alloc_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), &dma,GFP_KERNEL );if (!vaddr)
@@ -83,7 +83,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj) err_st:kfree (st); err_pci: -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma);return -ENOMEM ;
@@ -129,7 +129,7 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,sg_free_table (pages);kfree (pages); -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma); }
drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1 -1
@@ -172,7 +172,7 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj) max_segment =PAGE_SIZE ; goto rebuild_st; }else { -dev_warn (&i915->drm.pdev->dev, +dev_warn (i915->drm.dev,"Failed to DMA remap %lu pages\n" , page_count); goto err_pages;
drivers/gpu/drm/i915/gt/intel_engine_cs.c +1 -1
@@ -1228,7 +1228,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)/* Waiting to drain ELSP? */ if (execlists_active (&engine->execlists)) { -synchronize_hardirq (engine->i915->drm.pdev->irq); +synchronize_hardirq (to_pci_dev (engine->i915->drm.dev)->irq);intel_engine_flush_submission (engine);
drivers/gpu/drm/i915/gt/intel_ggtt.c +5 -5
@@ -760,7 +760,7 @@ static unsigned int chv_get_total_gtt_size(u16 gmch_ctrl)static int ggtt_probe_common (struct i915_ggtt *ggtt,u64 size) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);phys_addr_t phys_addr;int ret;
@@ -830,7 +830,7 @@ static struct resource pci_resource(struct pci_dev *pdev, int bar)static int gen8_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;
@@ -974,7 +974,7 @@ static u64 iris_pte_encode(dma_addr_t addr,static int gen6_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;
@@ -1037,7 +1037,7 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt)phys_addr_t gmadr_base;int ret; - ret =intel_gmch_probe (i915->bridge_dev, i915->drm.pdev,NULL ); + ret =intel_gmch_probe (i915->bridge_dev,to_pci_dev (i915->drm.dev),NULL );if (!ret) {drm_err (&i915->drm,"failed to set up gmch\n" );return -EIO ;
@@ -1077,7 +1077,7 @@ static int ggtt_probe_hw(struct i915_ggtt *ggtt, struct intel_gt *gt) ggtt->vm.gt = gt; ggtt->vm.i915 = i915; - ggtt->vm.dma = &i915->drm.pdev->dev; + ggtt->vm.dma = i915->drm.dev;if (INTEL_GEN (i915) <=5 ) ret =i915_gmch_probe (ggtt);
drivers/gpu/drm/i915/gt/intel_ppgtt.c +1 -1
@@ -301,7 +301,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt) ppgtt->vm.gt = gt; ppgtt->vm.i915 = i915; - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev; ppgtt->vm.total =BIT_ULL (INTEL_INFO (i915)->ppgtt_size);i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );
drivers/gpu/drm/i915/gt/intel_rc6.c +2 -2
@@ -485,14 +485,14 @@ static bool rc6_supported(struct intel_rc6 *rc6)static void rpm_get (struct intel_rc6 *rc6) {GEM_BUG_ON (rc6->wakeref); -pm_runtime_get_sync (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_get_sync (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = true; }static void rpm_put (struct intel_rc6 *rc6) {GEM_BUG_ON (!rc6->wakeref); -pm_runtime_put (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_put (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = false; }
drivers/gpu/drm/i915/gt/intel_reset.c +3 -3
@@ -180,7 +180,7 @@ static int i915_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);int err;/* Assert reset for at least 20 usec, and wait for acknowledgement. */
@@ -209,7 +209,7 @@ static int g33_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);pci_write_config_byte (pdev,I915_GDRST ,GRDOM_RESET_ENABLE );return wait_for_atomic (g4x_reset_complete (pdev),50 );
@@ -219,7 +219,7 @@ static int g4x_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);struct intel_uncore *uncore = gt->uncore;int ret;
drivers/gpu/drm/i915/gvt/cfg_space.c +3 -2
@@ -374,6 +374,7 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, bool primary) {struct intel_gvt *gvt = vgpu->gvt; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);const struct intel_gvt_device_info *info = &gvt->device_info;u16 *gmch_ctl;u8 next;
@@ -407,9 +408,9 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,memset (vgpu_cfg_space (vgpu) +INTEL_GVT_PCI_OPREGION ,0 ,4 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_GTTMMIO ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,0 ); +pci_resource_len (pdev,0 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,2 ); +pci_resource_len (pdev,2 );memset (vgpu_cfg_space (vgpu) +PCI_ROM_ADDRESS ,0 ,4 );
drivers/gpu/drm/i915/gvt/firmware.c +5 -5
@@ -76,7 +76,7 @@ static int mmio_snapshot_handler(struct intel_gvt *gvt, u32 offset, void *data)static int expose_firmware_sysfs (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;void *firmware;void *p;
@@ -127,7 +127,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)static void clean_firmware_sysfs (struct intel_gvt *gvt) { -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);device_remove_bin_file (&pdev->dev, &firmware_attr);vfree (firmware_attr.private);
@@ -151,7 +151,7 @@ static int verify_firmware(struct intel_gvt *gvt, const struct firmware *fw) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;unsigned long id, crc32_start;const void *mem;
@@ -205,7 +205,7 @@ static int verify_firmware(struct intel_gvt *gvt,int intel_gvt_load_firmware (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct intel_gvt_firmware *firmware = &gvt->firmware;struct gvt_firmware_header *h;const struct firmware *fw;
@@ -240,7 +240,7 @@ int intel_gvt_load_firmware(struct intel_gvt *gvt)gvt_dbg_core ("request hw state firmware %s...\n" , path); - ret =request_firmware (&fw, path, &gvt->gt->i915->drm.pdev->dev); + ret =request_firmware (&fw, path, gvt->gt->i915->drm.dev);kfree (path);if (ret)
drivers/gpu/drm/i915/gvt/gtt.c +6 -6
@@ -737,7 +737,7 @@ static int detach_oos_page(struct intel_vgpu *vgpu,static void ppgtt_free_spt (struct intel_vgpu_ppgtt_spt *spt) { -struct device *kdev = &spt->vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = spt->vgpu->gvt->gt->i915->drm.dev;trace_spt_free (spt->vgpu->id, spt, spt->guest_page.type);
@@ -822,7 +822,7 @@ static int reclaim_one_ppgtt_mm(struct intel_gvt *gvt);static struct intel_vgpu_ppgtt_spt *ppgtt_alloc_spt (struct intel_vgpu *vgpu,enum intel_gvt_gtt_type type) { -struct device *kdev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = vgpu->gvt->gt->i915->drm.dev;struct intel_vgpu_ppgtt_spt *spt =NULL ;dma_addr_t daddr;int ret;
@@ -2376,7 +2376,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu, vgpu->gvt->device_info.gtt_entry_size_shift;void *scratch_pt;int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr; if (drm_WARN_ON(&i915->drm,
@@ -2434,7 +2434,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu,static int release_scratch_page_tree (struct intel_vgpu *vgpu) {int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr;for (i =GTT_TYPE_PPGTT_PTE_PT ; i <GTT_TYPE_MAX ; i++) {
@@ -2706,7 +2706,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt) {int ret;void *page; -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr;gvt_dbg_core ("init gtt\n" );
@@ -2755,7 +2755,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt)*/ void intel_gvt_clean_gtt (struct intel_gvt *gvt) { -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr = (dma_addr_t)(gvt->gtt.scratch_mfn <<I915_GTT_PAGE_SHIFT );
drivers/gpu/drm/i915/gvt/gvt.c +3 -3
@@ -50,7 +50,7 @@ static struct intel_vgpu_type *intel_gvt_find_vgpu_type(struct intel_gvt *gvt, const char *name) {const char *driver_name = -dev_driver_string (&gvt->gt->i915->drm.pdev->dev); +dev_driver_string (gvt->gt->i915->drm.dev);int i; name +=strlen (driver_name) +1 ;
@@ -189,7 +189,7 @@ static const struct intel_gvt_ops intel_gvt_ops = {static void init_device_info (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev); info->max_support_vgpus =8 ; info->cfg_space_size =PCI_CFG_SPACE_EXP_SIZE ;
@@ -376,7 +376,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915)intel_gvt_debugfs_init (gvt);gvt_dbg_core ("gvt device initialization is done\n" ); - intel_gvt_host.dev = &i915->drm.pdev->dev; + intel_gvt_host.dev = i915->drm.dev; intel_gvt_host.initialized = true;return 0 ;
drivers/gpu/drm/i915/gvt/kvmgt.c +2 -2
@@ -221,7 +221,7 @@ static int gvt_pin_guest_page(struct intel_vgpu *vgpu, unsigned long gfn,static int gvt_dma_map_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t *dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;struct page *page =NULL ;int ret;
@@ -244,7 +244,7 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, unsigned long gfn,static void gvt_dma_unmap_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_unmap_page (dev, dma_addr, size,PCI_DMA_BIDIRECTIONAL );gvt_unpin_guest_page (vgpu, gfn, size);
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -1275,7 +1275,7 @@ static int i915_llc(struct seq_file *m, void *data)static int i915_runtime_pm_status (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);if (!HAS_RUNTIME_PM (dev_priv))seq_puts (m,"Runtime power management not supported\n" );
drivers/gpu/drm/i915/i915_drv.c +9 -11
@@ -91,7 +91,7 @@ static const struct drm_driver driver;static int i915_get_bridge_dev (struct drm_i915_private *dev_priv) { -int domain =pci_domain_nr (dev_priv->drm.pdev->bus); +int domain =pci_domain_nr (to_pci_dev (dev_priv->drm.dev)->bus); dev_priv->bridge_dev =pci_get_domain_bus_and_slot (domain,0 ,PCI_DEVFN (0 ,0 ));
@@ -458,7 +458,6 @@ static void intel_sanitize_options(struct drm_i915_private *dev_priv)*/ static int i915_set_dma_info (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev;unsigned int mask_size =INTEL_INFO (i915)->dma_mask_size;int ret;
@@ -468,9 +467,9 @@ static int i915_set_dma_info(struct drm_i915_private *i915)* We don't have a max segment size, so set it to the max so sg's * debugging layer doesn't complain */ -dma_set_max_seg_size (&pdev->dev,UINT_MAX ); +dma_set_max_seg_size (i915->drm.dev,UINT_MAX ); - ret =dma_set_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;
@@ -490,7 +489,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)if (IS_I965G (i915) ||IS_I965GM (i915)) mask_size =32 ; - ret =dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_coherent_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;
@@ -510,7 +509,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)*/ static int i915_driver_hw_probe (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;if (i915_inject_probe_failure (dev_priv))
@@ -642,7 +641,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)*/ static void i915_driver_hw_remove (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_perf_fini (dev_priv);
@@ -792,7 +791,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)if (IS_ERR (i915))return i915; - i915->drm.pdev = pdev;pci_set_drvdata (pdev, i915);/* Device parameters start as a copy of module parameters. */
@@ -1094,7 +1092,7 @@ static int i915_drm_prepare(struct drm_device *dev)static int i915_drm_suspend (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);pci_power_t opregion_target_state;disable_rpm_wakeref_asserts (&dev_priv->runtime_pm);
@@ -1151,7 +1149,7 @@ get_suspend_mode(struct drm_i915_private *dev_priv, bool hibernate)static int i915_drm_suspend_late (struct drm_device *dev,bool hibernation) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;int ret;
@@ -1279,7 +1277,7 @@ static int i915_drm_resume(struct drm_device *dev)static int i915_drm_resume_early (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;/*
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1295,7 +1295,7 @@ static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)#define INTEL_DEVID (dev_priv) (RUNTIME_INFO(dev_priv)->device_id)#define REVID_FOREVER 0xff -#define INTEL_REVID (dev_priv) ((dev_priv)->drm.pdev->revision) +#define INTEL_REVID (dev_priv) (to_pci_dev((dev_priv)->drm.dev)->revision)#define INTEL_GEN_MASK (s, e) ( \ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -2
@@ -28,7 +28,7 @@ int i915_gem_gtt_prepare_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) { do { - if (dma_map_sg_attrs(&obj->base.dev->pdev->dev, + if (dma_map_sg_attrs(obj->base.dev->dev, pages->sgl, pages->nents, PCI_DMA_BIDIRECTIONAL, DMA_ATTR_SKIP_CPU_SYNC |
@@ -56,7 +56,7 @@ void i915_gem_gtt_finish_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) {struct drm_i915_private *dev_priv =to_i915 (obj->base.dev); -struct device *kdev = &dev_priv->drm.pdev->dev; +struct device *kdev = dev_priv->drm.dev;struct i915_ggtt *ggtt = &dev_priv->ggtt;if (unlikely (ggtt->do_idle_maps)) {
drivers/gpu/drm/i915/i915_getparam.c +3 -2
@@ -12,6 +12,7 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {struct drm_i915_private *i915 =to_i915 (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);const struct sseu_dev_info *sseu = &i915->gt.info.sseu;drm_i915_getparam_t *param = data;int value;
@@ -24,10 +25,10 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data,/* Reject all old ums/dri params. */ return -ENODEV ;case I915_PARAM_CHIPSET_ID : - value = i915->drm.pdev->device; + value = pdev->device;break ;case I915_PARAM_REVISION : - value = i915->drm.pdev->revision; + value = pdev->revision;break ;case I915_PARAM_NUM_FENCES_AVAIL : value = i915->ggtt.num_fences;
drivers/gpu/drm/i915/i915_gpu_error.c +1 -1
@@ -644,7 +644,7 @@ static void err_print_params(struct drm_i915_error_state_buf *m,static void err_print_pciid (struct drm_i915_error_state_buf *m,struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);err_printf (m,"PCI ID: 0x%04x\n" , pdev->device);err_printf (m,"PCI Revision: 0x%02x\n" , pdev->revision);
drivers/gpu/drm/i915/i915_irq.c +3 -3
@@ -4354,7 +4354,7 @@ static void intel_irq_postinstall(struct drm_i915_private *dev_priv)*/ int intel_irq_install (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;int ret;/*
@@ -4389,7 +4389,7 @@ int intel_irq_install(struct drm_i915_private *dev_priv)*/ void intel_irq_uninstall (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;/* * FIXME we can get called twice during driver probe
@@ -4449,5 +4449,5 @@ bool intel_irqs_enabled(struct drm_i915_private *dev_priv)void intel_synchronize_irq (struct drm_i915_private *i915) { -synchronize_irq (i915->drm.pdev->irq); +synchronize_irq (to_pci_dev (i915->drm.dev)->irq); }
drivers/gpu/drm/i915/i915_pmu.c +3 -2
@@ -427,7 +427,8 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)static u64 count_interrupts (struct drm_i915_private *i915) {/* open-coded kstat_irqs() */ -struct irq_desc *desc =irq_to_desc (i915->drm.pdev->irq); +struct pci_dev *pdev =to_pci_dev (i915->drm.dev); +struct irq_desc *desc =irq_to_desc (pdev->irq);u64 sum =0 ;int cpu;
@@ -1117,7 +1118,7 @@ static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)static bool is_igp (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* IGP is 0000:00:02.0 */ return pci_domain_nr(pdev->bus) == 0 &&
drivers/gpu/drm/i915/i915_suspend.c +2 -2
@@ -84,7 +84,7 @@ static void intel_restore_swf(struct drm_i915_private *dev_priv)void i915_save_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);/* Display arbitration control */ if (INTEL_GEN (dev_priv) <=4 )
@@ -99,7 +99,7 @@ void i915_save_display(struct drm_i915_private *dev_priv)void i915_restore_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);intel_restore_swf (dev_priv);
drivers/gpu/drm/i915/i915_switcheroo.c +2 -2
@@ -54,14 +54,14 @@ static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {int i915_switcheroo_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);return vga_switcheroo_register_client (pdev, &i915_switcheroo_ops, false); }void i915_switcheroo_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_switcheroo_unregister_client (pdev); }
drivers/gpu/drm/i915/i915_vgpu.c +1 -1
@@ -61,7 +61,7 @@*/ void intel_vgpu_detect (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u64 magic;u16 version_major;void __iomem *shared_area;
drivers/gpu/drm/i915/intel_device_info.c +1 -1
@@ -348,7 +348,7 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) }if (IS_TIGERLAKE (i915)) { -struct pci_dev *root, *pdev = i915->drm.pdev; +struct pci_dev *root, *pdev =to_pci_dev (i915->drm.dev); root =list_first_entry (&pdev->bus->devices,typeof (*root), bus_list);
drivers/gpu/drm/i915/intel_region_lmem.c +4 -4
@@ -26,12 +26,12 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem)if (ret)return ret; - mem->remap_addr =dma_map_resource (&i915->drm.pdev->dev, + mem->remap_addr =dma_map_resource (i915->drm.dev, mem->region.start, mem->fake_mappable.size,PCI_DMA_BIDIRECTIONAL ,DMA_ATTR_FORCE_CONTIGUOUS ); -if (dma_mapping_error (&i915->drm.pdev->dev, mem->remap_addr)) { +if (dma_mapping_error (i915->drm.dev, mem->remap_addr)) {drm_mm_remove_node (&mem->fake_mappable);return -EINVAL ; }
@@ -56,7 +56,7 @@ static void release_fake_lmem_bar(struct intel_memory_region *mem)drm_mm_remove_node (&mem->fake_mappable); - dma_unmap_resource(&mem->i915->drm.pdev->dev, + dma_unmap_resource(mem->i915->drm.dev, mem->remap_addr, mem->fake_mappable.size, PCI_DMA_BIDIRECTIONAL,
@@ -104,7 +104,7 @@ const struct intel_memory_region_ops intel_region_lmem_ops = {struct intel_memory_region *intel_setup_fake_lmem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct intel_memory_region *mem;resource_size_t mappable_end;resource_size_t io_start;
drivers/gpu/drm/i915/intel_runtime_pm.c +1 -1
@@ -625,7 +625,7 @@ void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm) {struct drm_i915_private *i915 = container_of(rpm, struct drm_i915_private, runtime_pm); -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct device *kdev = &pdev->dev; rpm->kdev = kdev;
drivers/gpu/drm/i915/intel_uncore.c +2 -2
@@ -1780,7 +1780,7 @@ static int i915_pmic_bus_access_notifier(struct notifier_block *nb,static int uncore_mmio_setup (struct intel_uncore *uncore) {struct drm_i915_private *i915 = uncore->i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int mmio_bar;int mmio_size;
@@ -1812,7 +1812,7 @@ static int uncore_mmio_setup(struct intel_uncore *uncore)static void uncore_mmio_cleanup (struct intel_uncore *uncore) { -struct pci_dev *pdev = uncore->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (uncore->i915->drm.dev);pci_iounmap (pdev, uncore->regs); }
drivers/gpu/drm/i915/selftests/mock_gem_device.c +0 -1
@@ -148,7 +148,6 @@ struct drm_i915_private *mock_gem_device(void) }pci_set_drvdata (pdev, i915); - i915->drm.pdev = pdev;dev_pm_domain_set (&pdev->dev, &pm_domain);pm_runtime_enable (&pdev->dev);
drivers/gpu/drm/i915/selftests/mock_gtt.c +1 -1
@@ -74,7 +74,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name) ppgtt->vm.i915 = i915; ppgtt->vm.total =round_down (U64_MAX ,PAGE_SIZE ); ppgtt->vm.file =ERR_PTR (-ENODEV ); - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev;i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );
Signature · 1 line
2.29.2
Joonas Lahtinen
maintainerRe: [PATCH 07/15] drm/i915: Remove references to struct drm_device.pdev
Quoting Thomas Zimmermann (2020-11-24 13:38:16)
Quoted 7 lines
Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Jani Nikula <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Rodrigo Vivi <[email protected]>
Any chance of sharing used a cocci script(s)? think this will hit many in-flight series, so life would made easier :)
Or is this done manually? I notice a few places hoist the pdev variable and others repeat the call. Regardless, using the cocci script as baseline would make review bit more comforting.
The gvt changes would go in through the gvt tree, and we also probably need to split between drm-intel-next/drm-intel-gt-next, too.
Jani or Rodrigo, any thoughts?
Regards, Joonas
Quoted 1,090 lines
--- drivers/gpu/drm/i915/display/intel_bios.c | 2 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++------- drivers/gpu/drm/i915/display/intel_csr.c | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +++-- drivers/gpu/drm/i915/display/intel_opregion.c | 6 +++--- drivers/gpu/drm/i915/display/intel_overlay.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++-- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vga.c | 8 ++++---- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 +++++----- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_rc6.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +++--- drivers/gpu/drm/i915/gvt/cfg_space.c | 5 +++-- drivers/gpu/drm/i915/gvt/firmware.c | 10 +++++----- drivers/gpu/drm/i915/gvt/gtt.c | 12 +++++------ drivers/gpu/drm/i915/gvt/gvt.c | 6 +++--- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++---------- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_getparam.c | 5 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 6 +++--- drivers/gpu/drm/i915/i915_pmu.c | 5 +++-- drivers/gpu/drm/i915/i915_suspend.c | 4 ++-- drivers/gpu/drm/i915/i915_switcheroo.c | 4 ++-- drivers/gpu/drm/i915/i915_vgpu.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_region_lmem.c | 8 ++++---- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- .../gpu/drm/i915/selftests/mock_gem_device.c | 1 - drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 +- 42 files changed, 99 insertions(+), 98 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +1
-1@@ -2088,7 +2088,7 @@ bool intel_bios_is_valid_vbt(const void *buf, size_t size)static struct vbt_header *oprom_get_vbt (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);void __iomem *p =NULL , *oprom;struct vbt_header *vbt;u16 vbt_size;drivers/gpu/drm/i915/display/intel_cdclk.c +7
-7@@ -96,7 +96,7 @@ static void fixed_450mhz_get_cdclk(struct drm_i915_private *dev_priv,static void i85x_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 hpllcc =0 ;/* @@ -138,7 +138,7 @@ static void i85x_get_cdclk(struct drm_i915_private *dev_priv,static void i915gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -162,7 +162,7 @@ static void i915gm_get_cdclk(struct drm_i915_private *dev_priv,static void i945gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -256,7 +256,7 @@ static unsigned int intel_hpll_vco(struct drm_i915_private *dev_priv)static void g33_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {12 ,10 ,8 ,7 ,5 ,16 };static const u8 div_4000[] = {14 ,12 ,10 ,8 ,6 ,20 };static const u8 div_4800[] = {20 ,14 ,12 ,10 ,8 ,24 };@@ -305,7 +305,7 @@ static void g33_get_cdclk(struct drm_i915_private *dev_priv,static void pnv_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -339,7 +339,7 @@ static void pnv_get_cdclk(struct drm_i915_private *dev_priv,static void i965gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {16 ,10 ,8 };static const u8 div_4000[] = {20 ,12 ,10 };static const u8 div_5333[] = {24 ,16 ,14 };@@ -384,7 +384,7 @@ static void i965gm_get_cdclk(struct drm_i915_private *dev_priv,static void gm45_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);unsigned int cdclk_sel;u16 tmp =0 ;drivers/gpu/drm/i915/display/intel_csr.c +1
-1@@ -640,7 +640,7 @@ static void csr_load_work_fn(struct work_struct *work) dev_priv =container_of (work,typeof (*dev_priv), csr.work); csr = &dev_priv->csr; -request_firmware (&fw, dev_priv->csr.fw_path, &dev_priv->drm.pdev->dev); +request_firmware (&fw, dev_priv->csr.fw_path, dev_priv->drm.dev);parse_csr_fw (dev_priv, fw);if (dev_priv->csr.dmc_payload) {drivers/gpu/drm/i915/display/intel_dsi_vbt.c +1
-1@@ -425,7 +425,7 @@ static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi, const u16 slave_addr) {struct drm_device *drm_dev = intel_dsi->base.base.dev; -struct device *dev = &drm_dev->pdev->dev; +struct device *dev = drm_dev->dev;struct acpi_device *acpi_dev;struct list_head resource_list;struct i2c_adapter_lookup lookup;drivers/gpu/drm/i915/display/intel_fbdev.c +1
-1@@ -167,7 +167,7 @@ static int intelfb_create(struct drm_fb_helper *helper,struct intel_framebuffer *intel_fb = ifbdev->fb;struct drm_device *dev = helper->dev;struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct i915_ggtt *ggtt = &dev_priv->ggtt;const struct i915_ggtt_view view = { .type =I915_GGTT_VIEW_NORMAL ,drivers/gpu/drm/i915/display/intel_gmbus.c +1
-1@@ -840,7 +840,7 @@ static const struct i2c_lock_operations gmbus_lock_ops = {*/ int intel_gmbus_setup (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_gmbus *bus;unsigned int pin;int ret;drivers/gpu/drm/i915/display/intel_lpe_audio.c +3
-2@@ -80,6 +80,7 @@ static struct platform_device * lpe_audio_platdev_create(struct drm_i915_private *dev_priv) {struct drm_device *dev = &dev_priv->drm; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -99,9 +100,9 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[0 ].flags =IORESOURCE_IRQ ; rsc[0 ].name ="hdmi-lpe-audio-irq" ; - rsc[1 ].start =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].start =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE ; - rsc[1 ].end =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].end =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE +I915_HDMI_LPE_AUDIO_SIZE -1 ; rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ;drivers/gpu/drm/i915/display/intel_opregion.c +3
-3@@ -247,7 +247,7 @@ static int swsci(struct drm_i915_private *dev_priv, u32 function, u32 parm, u32 *parm_out) { struct opregion_swsci *swsci = dev_priv->opregion.swsci; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 main_function, sub_function, scic;u16 swsci_val;u32 dslp;@@ -807,7 +807,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)if (!name || !*name)return -ENOENT ; - ret =request_firmware (&fw, name, &dev_priv->drm.pdev->dev); + ret =request_firmware (&fw, name, dev_priv->drm.dev);if (ret) { drm_err(&dev_priv->drm, "Requesting VBT firmware \"%s\" failed (%d)\n",@@ -840,7 +840,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)int intel_opregion_setup (struct drm_i915_private *dev_priv) {struct intel_opregion *opregion = &dev_priv->opregion; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 asls, mboxes;char buf[sizeof (OPREGION_SIGNATURE )];int err =0 ;drivers/gpu/drm/i915/display/intel_overlay.c +1
-1@@ -201,7 +201,7 @@ struct intel_overlay {static void i830_overlay_clock_gating (struct drm_i915_private *dev_priv,bool enable) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u8 val;/* WA_OVERLAY_CLKGATE:alm */ drivers/gpu/drm/i915/display/intel_panel.c +2
-2@@ -557,7 +557,7 @@ static u32 i9xx_get_backlight(struct intel_connector *connector)if (panel->backlight.combination_mode) {u8 lbpc; -pci_read_config_byte (dev_priv->drm.pdev,LBPC , &lbpc); +pci_read_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , &lbpc); val *= lbpc; }@@ -631,7 +631,7 @@ static void i9xx_set_backlight(const struct drm_connector_state *conn_state, u32 lbpc = level *0xfe / panel->backlight.max +1 ; level /= lbpc; -pci_write_config_byte (dev_priv->drm.pdev,LBPC , lbpc); +pci_write_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , lbpc); }if (IS_GEN (dev_priv,4 )) {drivers/gpu/drm/i915/display/intel_quirks.c +1
-1@@ -160,7 +160,7 @@ static struct intel_quirk intel_quirks[] = {void intel_init_quirks (struct drm_i915_private *i915) { -struct pci_dev *d = i915->drm.pdev; +struct pci_dev *d =to_pci_dev (i915->drm.dev);int i;for (i =0 ; i <ARRAY_SIZE (intel_quirks); i++) {drivers/gpu/drm/i915/display/intel_sdvo.c +1
-1@@ -3281,7 +3281,7 @@ static bool intel_sdvo_init_ddc_proxy(struct intel_sdvo *sdvo, struct drm_i915_private *dev_priv) { - struct pci_dev *pdev = dev_priv->drm.pdev; + struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); sdvo->ddc.owner =THIS_MODULE ; sdvo->ddc.class =I2C_CLASS_DDC ;drivers/gpu/drm/i915/display/intel_vga.c +4
-4@@ -25,7 +25,7 @@ static i915_reg_t intel_vga_cntrl_reg(struct drm_i915_private *i915)/* Disable the VGA plane that we never use */ void intel_vga_disable (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_reg_t vga_reg =intel_vga_cntrl_reg (dev_priv);u8 sr1;@@ -76,7 +76,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)void intel_vga_reset_io_mem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* * After we re-enable the power well, if we touch VGA register 0x3d5 @@ -136,7 +136,7 @@ intel_vga_set_decode(void *cookie, bool enable_decode)int intel_vga_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int ret;/* @@ -156,7 +156,7 @@ int intel_vga_register(struct drm_i915_private *i915)void intel_vga_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_client_register (pdev,NULL ,NULL ,NULL ); }drivers/gpu/drm/i915/gem/i915_gem_phys.c +3
-3@@ -35,7 +35,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)* to handle all possible callers, and given typical object sizes, * the alignment of the buddy allocation will naturally match. */ - vaddr =dma_alloc_coherent (&obj->base.dev->pdev->dev, + vaddr =dma_alloc_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), &dma,GFP_KERNEL );if (!vaddr)@@ -83,7 +83,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj) err_st:kfree (st); err_pci: -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma);return -ENOMEM ;@@ -129,7 +129,7 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,sg_free_table (pages);kfree (pages); -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma); }drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1
-1@@ -172,7 +172,7 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj) max_segment =PAGE_SIZE ; goto rebuild_st; }else { -dev_warn (&i915->drm.pdev->dev, +dev_warn (i915->drm.dev,"Failed to DMA remap %lu pages\n" , page_count); goto err_pages;drivers/gpu/drm/i915/gt/intel_engine_cs.c +1
-1@@ -1228,7 +1228,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)/* Waiting to drain ELSP? */ if (execlists_active (&engine->execlists)) { -synchronize_hardirq (engine->i915->drm.pdev->irq); +synchronize_hardirq (to_pci_dev (engine->i915->drm.dev)->irq);intel_engine_flush_submission (engine);drivers/gpu/drm/i915/gt/intel_ggtt.c +5
-5@@ -760,7 +760,7 @@ static unsigned int chv_get_total_gtt_size(u16 gmch_ctrl)static int ggtt_probe_common (struct i915_ggtt *ggtt,u64 size) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);phys_addr_t phys_addr;int ret;@@ -830,7 +830,7 @@ static struct resource pci_resource(struct pci_dev *pdev, int bar)static int gen8_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;@@ -974,7 +974,7 @@ static u64 iris_pte_encode(dma_addr_t addr,static int gen6_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;@@ -1037,7 +1037,7 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt)phys_addr_t gmadr_base;int ret; - ret =intel_gmch_probe (i915->bridge_dev, i915->drm.pdev,NULL ); + ret =intel_gmch_probe (i915->bridge_dev,to_pci_dev (i915->drm.dev),NULL );if (!ret) {drm_err (&i915->drm,"failed to set up gmch\n" );return -EIO ;@@ -1077,7 +1077,7 @@ static int ggtt_probe_hw(struct i915_ggtt *ggtt, struct intel_gt *gt) ggtt->vm.gt = gt; ggtt->vm.i915 = i915; - ggtt->vm.dma = &i915->drm.pdev->dev; + ggtt->vm.dma = i915->drm.dev;if (INTEL_GEN (i915) <=5 ) ret =i915_gmch_probe (ggtt);drivers/gpu/drm/i915/gt/intel_ppgtt.c +1
-1@@ -301,7 +301,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt) ppgtt->vm.gt = gt; ppgtt->vm.i915 = i915; - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev; ppgtt->vm.total =BIT_ULL (INTEL_INFO (i915)->ppgtt_size);i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );drivers/gpu/drm/i915/gt/intel_rc6.c +2
-2@@ -485,14 +485,14 @@ static bool rc6_supported(struct intel_rc6 *rc6)static void rpm_get (struct intel_rc6 *rc6) {GEM_BUG_ON (rc6->wakeref); -pm_runtime_get_sync (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_get_sync (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = true; }static void rpm_put (struct intel_rc6 *rc6) {GEM_BUG_ON (!rc6->wakeref); -pm_runtime_put (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_put (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = false; }drivers/gpu/drm/i915/gt/intel_reset.c +3
-3@@ -180,7 +180,7 @@ static int i915_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);int err;/* Assert reset for at least 20 usec, and wait for acknowledgement. */ @@ -209,7 +209,7 @@ static int g33_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);pci_write_config_byte (pdev,I915_GDRST ,GRDOM_RESET_ENABLE );return wait_for_atomic (g4x_reset_complete (pdev),50 );@@ -219,7 +219,7 @@ static int g4x_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);struct intel_uncore *uncore = gt->uncore;int ret;drivers/gpu/drm/i915/gvt/cfg_space.c +3
-2@@ -374,6 +374,7 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, bool primary) {struct intel_gvt *gvt = vgpu->gvt; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);const struct intel_gvt_device_info *info = &gvt->device_info;u16 *gmch_ctl;u8 next;@@ -407,9 +408,9 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,memset (vgpu_cfg_space (vgpu) +INTEL_GVT_PCI_OPREGION ,0 ,4 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_GTTMMIO ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,0 ); +pci_resource_len (pdev,0 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,2 ); +pci_resource_len (pdev,2 );memset (vgpu_cfg_space (vgpu) +PCI_ROM_ADDRESS ,0 ,4 );drivers/gpu/drm/i915/gvt/firmware.c +5
-5@@ -76,7 +76,7 @@ static int mmio_snapshot_handler(struct intel_gvt *gvt, u32 offset, void *data)static int expose_firmware_sysfs (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;void *firmware;void *p;@@ -127,7 +127,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)static void clean_firmware_sysfs (struct intel_gvt *gvt) { -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);device_remove_bin_file (&pdev->dev, &firmware_attr);vfree (firmware_attr.private);@@ -151,7 +151,7 @@ static int verify_firmware(struct intel_gvt *gvt, const struct firmware *fw) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;unsigned long id, crc32_start;const void *mem;@@ -205,7 +205,7 @@ static int verify_firmware(struct intel_gvt *gvt,int intel_gvt_load_firmware (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct intel_gvt_firmware *firmware = &gvt->firmware;struct gvt_firmware_header *h;const struct firmware *fw;@@ -240,7 +240,7 @@ int intel_gvt_load_firmware(struct intel_gvt *gvt)gvt_dbg_core ("request hw state firmware %s...\n" , path); - ret =request_firmware (&fw, path, &gvt->gt->i915->drm.pdev->dev); + ret =request_firmware (&fw, path, gvt->gt->i915->drm.dev);kfree (path);if (ret)drivers/gpu/drm/i915/gvt/gtt.c +6
-6@@ -737,7 +737,7 @@ static int detach_oos_page(struct intel_vgpu *vgpu,static void ppgtt_free_spt (struct intel_vgpu_ppgtt_spt *spt) { -struct device *kdev = &spt->vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = spt->vgpu->gvt->gt->i915->drm.dev;trace_spt_free (spt->vgpu->id, spt, spt->guest_page.type);@@ -822,7 +822,7 @@ static int reclaim_one_ppgtt_mm(struct intel_gvt *gvt);static struct intel_vgpu_ppgtt_spt *ppgtt_alloc_spt (struct intel_vgpu *vgpu,enum intel_gvt_gtt_type type) { -struct device *kdev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = vgpu->gvt->gt->i915->drm.dev;struct intel_vgpu_ppgtt_spt *spt =NULL ;dma_addr_t daddr;int ret;@@ -2376,7 +2376,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu, vgpu->gvt->device_info.gtt_entry_size_shift;void *scratch_pt;int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr; if (drm_WARN_ON(&i915->drm,@@ -2434,7 +2434,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu,static int release_scratch_page_tree (struct intel_vgpu *vgpu) {int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr;for (i =GTT_TYPE_PPGTT_PTE_PT ; i <GTT_TYPE_MAX ; i++) {@@ -2706,7 +2706,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt) {int ret;void *page; -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr;gvt_dbg_core ("init gtt\n" );@@ -2755,7 +2755,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt)*/ void intel_gvt_clean_gtt (struct intel_gvt *gvt) { -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr = (dma_addr_t)(gvt->gtt.scratch_mfn <<I915_GTT_PAGE_SHIFT );drivers/gpu/drm/i915/gvt/gvt.c +3
-3@@ -50,7 +50,7 @@ static struct intel_vgpu_type *intel_gvt_find_vgpu_type(struct intel_gvt *gvt, const char *name) {const char *driver_name = -dev_driver_string (&gvt->gt->i915->drm.pdev->dev); +dev_driver_string (gvt->gt->i915->drm.dev);int i; name +=strlen (driver_name) +1 ;@@ -189,7 +189,7 @@ static const struct intel_gvt_ops intel_gvt_ops = {static void init_device_info (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev); info->max_support_vgpus =8 ; info->cfg_space_size =PCI_CFG_SPACE_EXP_SIZE ;@@ -376,7 +376,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915)intel_gvt_debugfs_init (gvt);gvt_dbg_core ("gvt device initialization is done\n" ); - intel_gvt_host.dev = &i915->drm.pdev->dev; + intel_gvt_host.dev = i915->drm.dev; intel_gvt_host.initialized = true;return 0 ;drivers/gpu/drm/i915/gvt/kvmgt.c +2
-2@@ -221,7 +221,7 @@ static int gvt_pin_guest_page(struct intel_vgpu *vgpu, unsigned long gfn,static int gvt_dma_map_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t *dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;struct page *page =NULL ;int ret;@@ -244,7 +244,7 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, unsigned long gfn,static void gvt_dma_unmap_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_unmap_page (dev, dma_addr, size,PCI_DMA_BIDIRECTIONAL );gvt_unpin_guest_page (vgpu, gfn, size);drivers/gpu/drm/i915/i915_debugfs.c +1
-1@@ -1275,7 +1275,7 @@ static int i915_llc(struct seq_file *m, void *data)static int i915_runtime_pm_status (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);if (!HAS_RUNTIME_PM (dev_priv))seq_puts (m,"Runtime power management not supported\n" );drivers/gpu/drm/i915/i915_drv.c +9
-11@@ -91,7 +91,7 @@ static const struct drm_driver driver;static int i915_get_bridge_dev (struct drm_i915_private *dev_priv) { -int domain =pci_domain_nr (dev_priv->drm.pdev->bus); +int domain =pci_domain_nr (to_pci_dev (dev_priv->drm.dev)->bus); dev_priv->bridge_dev =pci_get_domain_bus_and_slot (domain,0 ,PCI_DEVFN (0 ,0 ));@@ -458,7 +458,6 @@ static void intel_sanitize_options(struct drm_i915_private *dev_priv)*/ static int i915_set_dma_info (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev;unsigned int mask_size =INTEL_INFO (i915)->dma_mask_size;int ret;@@ -468,9 +467,9 @@ static int i915_set_dma_info(struct drm_i915_private *i915)* We don't have a max segment size, so set it to the max so sg's * debugging layer doesn't complain */ -dma_set_max_seg_size (&pdev->dev,UINT_MAX ); +dma_set_max_seg_size (i915->drm.dev,UINT_MAX ); - ret =dma_set_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;@@ -490,7 +489,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)if (IS_I965G (i915) ||IS_I965GM (i915)) mask_size =32 ; - ret =dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_coherent_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;@@ -510,7 +509,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)*/ static int i915_driver_hw_probe (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;if (i915_inject_probe_failure (dev_priv))@@ -642,7 +641,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)*/ static void i915_driver_hw_remove (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_perf_fini (dev_priv);@@ -792,7 +791,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)if (IS_ERR (i915))return i915; - i915->drm.pdev = pdev;pci_set_drvdata (pdev, i915);/* Device parameters start as a copy of module parameters. */ @@ -1094,7 +1092,7 @@ static int i915_drm_prepare(struct drm_device *dev)static int i915_drm_suspend (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);pci_power_t opregion_target_state;disable_rpm_wakeref_asserts (&dev_priv->runtime_pm);@@ -1151,7 +1149,7 @@ get_suspend_mode(struct drm_i915_private *dev_priv, bool hibernate)static int i915_drm_suspend_late (struct drm_device *dev,bool hibernation) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;int ret;@@ -1279,7 +1277,7 @@ static int i915_drm_resume(struct drm_device *dev)static int i915_drm_resume_early (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;/* drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1295,7 +1295,7 @@ static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)#define INTEL_DEVID (dev_priv) (RUNTIME_INFO(dev_priv)->device_id)#define REVID_FOREVER 0xff -#define INTEL_REVID (dev_priv) ((dev_priv)->drm.pdev->revision) +#define INTEL_REVID (dev_priv) (to_pci_dev((dev_priv)->drm.dev)->revision)#define INTEL_GEN_MASK (s, e) ( \ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \drivers/gpu/drm/i915/i915_gem_gtt.c +2
-2@@ -28,7 +28,7 @@ int i915_gem_gtt_prepare_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) { do { - if (dma_map_sg_attrs(&obj->base.dev->pdev->dev, + if (dma_map_sg_attrs(obj->base.dev->dev, pages->sgl, pages->nents, PCI_DMA_BIDIRECTIONAL, DMA_ATTR_SKIP_CPU_SYNC |@@ -56,7 +56,7 @@ void i915_gem_gtt_finish_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) {struct drm_i915_private *dev_priv =to_i915 (obj->base.dev); -struct device *kdev = &dev_priv->drm.pdev->dev; +struct device *kdev = dev_priv->drm.dev;struct i915_ggtt *ggtt = &dev_priv->ggtt;if (unlikely (ggtt->do_idle_maps)) {drivers/gpu/drm/i915/i915_getparam.c +3
-2@@ -12,6 +12,7 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {struct drm_i915_private *i915 =to_i915 (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);const struct sseu_dev_info *sseu = &i915->gt.info.sseu;drm_i915_getparam_t *param = data;int value;@@ -24,10 +25,10 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data,/* Reject all old ums/dri params. */ return -ENODEV ;case I915_PARAM_CHIPSET_ID : - value = i915->drm.pdev->device; + value = pdev->device;break ;case I915_PARAM_REVISION : - value = i915->drm.pdev->revision; + value = pdev->revision;break ;case I915_PARAM_NUM_FENCES_AVAIL : value = i915->ggtt.num_fences;drivers/gpu/drm/i915/i915_gpu_error.c +1
-1@@ -644,7 +644,7 @@ static void err_print_params(struct drm_i915_error_state_buf *m,static void err_print_pciid (struct drm_i915_error_state_buf *m,struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);err_printf (m,"PCI ID: 0x%04x\n" , pdev->device);err_printf (m,"PCI Revision: 0x%02x\n" , pdev->revision);drivers/gpu/drm/i915/i915_irq.c +3
-3@@ -4354,7 +4354,7 @@ static void intel_irq_postinstall(struct drm_i915_private *dev_priv)*/ int intel_irq_install (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;int ret;/* @@ -4389,7 +4389,7 @@ int intel_irq_install(struct drm_i915_private *dev_priv)*/ void intel_irq_uninstall (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;/* * FIXME we can get called twice during driver probe @@ -4449,5 +4449,5 @@ bool intel_irqs_enabled(struct drm_i915_private *dev_priv)void intel_synchronize_irq (struct drm_i915_private *i915) { -synchronize_irq (i915->drm.pdev->irq); +synchronize_irq (to_pci_dev (i915->drm.dev)->irq); }drivers/gpu/drm/i915/i915_pmu.c +3
-2@@ -427,7 +427,8 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)static u64 count_interrupts (struct drm_i915_private *i915) {/* open-coded kstat_irqs() */ -struct irq_desc *desc =irq_to_desc (i915->drm.pdev->irq); +struct pci_dev *pdev =to_pci_dev (i915->drm.dev); +struct irq_desc *desc =irq_to_desc (pdev->irq);u64 sum =0 ;int cpu;@@ -1117,7 +1118,7 @@ static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)static bool is_igp (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* IGP is 0000:00:02.0 */ return pci_domain_nr(pdev->bus) == 0 &&drivers/gpu/drm/i915/i915_suspend.c +2
-2@@ -84,7 +84,7 @@ static void intel_restore_swf(struct drm_i915_private *dev_priv)void i915_save_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);/* Display arbitration control */ if (INTEL_GEN (dev_priv) <=4 )@@ -99,7 +99,7 @@ void i915_save_display(struct drm_i915_private *dev_priv)void i915_restore_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);intel_restore_swf (dev_priv);drivers/gpu/drm/i915/i915_switcheroo.c +2
-2@@ -54,14 +54,14 @@ static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {int i915_switcheroo_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);return vga_switcheroo_register_client (pdev, &i915_switcheroo_ops, false); }void i915_switcheroo_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_switcheroo_unregister_client (pdev); }drivers/gpu/drm/i915/i915_vgpu.c +1
-1@@ -61,7 +61,7 @@*/ void intel_vgpu_detect (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u64 magic;u16 version_major;void __iomem *shared_area;drivers/gpu/drm/i915/intel_device_info.c +1
-1@@ -348,7 +348,7 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) }if (IS_TIGERLAKE (i915)) { -struct pci_dev *root, *pdev = i915->drm.pdev; +struct pci_dev *root, *pdev =to_pci_dev (i915->drm.dev); root =list_first_entry (&pdev->bus->devices,typeof (*root), bus_list);drivers/gpu/drm/i915/intel_region_lmem.c +4
-4@@ -26,12 +26,12 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem)if (ret)return ret; - mem->remap_addr =dma_map_resource (&i915->drm.pdev->dev, + mem->remap_addr =dma_map_resource (i915->drm.dev, mem->region.start, mem->fake_mappable.size,PCI_DMA_BIDIRECTIONAL ,DMA_ATTR_FORCE_CONTIGUOUS ); -if (dma_mapping_error (&i915->drm.pdev->dev, mem->remap_addr)) { +if (dma_mapping_error (i915->drm.dev, mem->remap_addr)) {drm_mm_remove_node (&mem->fake_mappable);return -EINVAL ; }@@ -56,7 +56,7 @@ static void release_fake_lmem_bar(struct intel_memory_region *mem)drm_mm_remove_node (&mem->fake_mappable); - dma_unmap_resource(&mem->i915->drm.pdev->dev, + dma_unmap_resource(mem->i915->drm.dev, mem->remap_addr, mem->fake_mappable.size, PCI_DMA_BIDIRECTIONAL,@@ -104,7 +104,7 @@ const struct intel_memory_region_ops intel_region_lmem_ops = {struct intel_memory_region *intel_setup_fake_lmem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct intel_memory_region *mem;resource_size_t mappable_end;resource_size_t io_start;drivers/gpu/drm/i915/intel_runtime_pm.c +1
-1@@ -625,7 +625,7 @@ void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm) {struct drm_i915_private *i915 = container_of(rpm, struct drm_i915_private, runtime_pm); -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct device *kdev = &pdev->dev; rpm->kdev = kdev;drivers/gpu/drm/i915/intel_uncore.c +2
-2@@ -1780,7 +1780,7 @@ static int i915_pmic_bus_access_notifier(struct notifier_block *nb,static int uncore_mmio_setup (struct intel_uncore *uncore) {struct drm_i915_private *i915 = uncore->i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int mmio_bar;int mmio_size;@@ -1812,7 +1812,7 @@ static int uncore_mmio_setup(struct intel_uncore *uncore)static void uncore_mmio_cleanup (struct intel_uncore *uncore) { -struct pci_dev *pdev = uncore->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (uncore->i915->drm.dev);pci_iounmap (pdev, uncore->regs); }drivers/gpu/drm/i915/selftests/mock_gem_device.c +0
-1@@ -148,7 +148,6 @@ struct drm_i915_private *mock_gem_device(void) }pci_set_drvdata (pdev, i915); - i915->drm.pdev = pdev;dev_pm_domain_set (&pdev->dev, &pm_domain);pm_runtime_enable (&pdev->dev);drivers/gpu/drm/i915/selftests/mock_gtt.c +1
-1@@ -74,7 +74,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name) ppgtt->vm.i915 = i915; ppgtt->vm.total =round_down (U64_MAX ,PAGE_SIZE ); ppgtt->vm.file =ERR_PTR (-ENODEV ); - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev;i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerRe: [PATCH 07/15] drm/i915: Remove references to struct drm_device.pdev
Hi
Am 27.11.20 um 14:20 schrieb Joonas Lahtinen:
Quoted 11 lines
Quoting Thomas Zimmermann (2020-11-24 13:38:16)
Quoted 7 lines
Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Jani Nikula <jani.nikula-VuQAYsv1563Yd54FQh9/[email protected]>Cc Joonas Lahtinen <joonas.lahtinen-VuQAYsv1563Yd54FQh9/[email protected]>Cc Rodrigo Vivi <[email protected]>Any chance of sharing used a cocci script(s)? think this will hit many in-flight series, so life would made easier :)
There's no script, sorry. I did this by hand.
Quoted 8 lines
Or is this done manually? I notice a few places hoist the pdev variable and others repeat the call. Regardless, using the cocci script as baseline would make review bit more comforting.
The gvt changes would go in through the gvt tree, and we also probably need to split between drm-intel-next/drm-intel-gt-next, too.
My hope is that patches can be merged through driver trees and do not create too many conflicts there. After the dust has settled, the final patch would go through drm-misc. If any uses of pdev were added meanwhile, I'd fix them through drm-misc as well.
Best regards
Thomas
Quoted 1,095 lines
Jani or Rodrigo, any thoughts?
Regards, Joonas
Quoted 1,090 lines
--- drivers/gpu/drm/i915/display/intel_bios.c | 2 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++------- drivers/gpu/drm/i915/display/intel_csr.c | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +++-- drivers/gpu/drm/i915/display/intel_opregion.c | 6 +++--- drivers/gpu/drm/i915/display/intel_overlay.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 4 ++-- drivers/gpu/drm/i915/display/intel_quirks.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 2 +- drivers/gpu/drm/i915/display/intel_vga.c | 8 ++++---- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 +++++----- drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_rc6.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +++--- drivers/gpu/drm/i915/gvt/cfg_space.c | 5 +++-- drivers/gpu/drm/i915/gvt/firmware.c | 10 +++++----- drivers/gpu/drm/i915/gvt/gtt.c | 12 +++++------ drivers/gpu/drm/i915/gvt/gvt.c | 6 +++--- drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++---------- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_getparam.c | 5 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 6 +++--- drivers/gpu/drm/i915/i915_pmu.c | 5 +++-- drivers/gpu/drm/i915/i915_suspend.c | 4 ++-- drivers/gpu/drm/i915/i915_switcheroo.c | 4 ++-- drivers/gpu/drm/i915/i915_vgpu.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_region_lmem.c | 8 ++++---- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 4 ++-- .../gpu/drm/i915/selftests/mock_gem_device.c | 1 - drivers/gpu/drm/i915/selftests/mock_gtt.c | 2 +- 42 files changed, 99 insertions(+), 98 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +1
-1@@ -2088,7 +2088,7 @@ bool intel_bios_is_valid_vbt(const void *buf, size_t size)static struct vbt_header *oprom_get_vbt (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);void __iomem *p =NULL , *oprom;struct vbt_header *vbt;u16 vbt_size;drivers/gpu/drm/i915/display/intel_cdclk.c +7
-7@@ -96,7 +96,7 @@ static void fixed_450mhz_get_cdclk(struct drm_i915_private *dev_priv,static void i85x_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 hpllcc =0 ;/* @@ -138,7 +138,7 @@ static void i85x_get_cdclk(struct drm_i915_private *dev_priv,static void i915gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -162,7 +162,7 @@ static void i915gm_get_cdclk(struct drm_i915_private *dev_priv,static void i945gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -256,7 +256,7 @@ static unsigned int intel_hpll_vco(struct drm_i915_private *dev_priv)static void g33_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {12 ,10 ,8 ,7 ,5 ,16 };static const u8 div_4000[] = {14 ,12 ,10 ,8 ,6 ,20 };static const u8 div_4800[] = {20 ,14 ,12 ,10 ,8 ,24 };@@ -305,7 +305,7 @@ static void g33_get_cdclk(struct drm_i915_private *dev_priv,static void pnv_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u16 gcfgc =0 ;pci_read_config_word (pdev,GCFGC , &gcfgc);@@ -339,7 +339,7 @@ static void pnv_get_cdclk(struct drm_i915_private *dev_priv,static void i965gm_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);static const u8 div_3200[] = {16 ,10 ,8 };static const u8 div_4000[] = {20 ,12 ,10 };static const u8 div_5333[] = {24 ,16 ,14 };@@ -384,7 +384,7 @@ static void i965gm_get_cdclk(struct drm_i915_private *dev_priv,static void gm45_get_cdclk (struct drm_i915_private *dev_priv,struct intel_cdclk_config *cdclk_config) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);unsigned int cdclk_sel;u16 tmp =0 ;drivers/gpu/drm/i915/display/intel_csr.c +1
-1@@ -640,7 +640,7 @@ static void csr_load_work_fn(struct work_struct *work) dev_priv =container_of (work,typeof (*dev_priv), csr.work); csr = &dev_priv->csr; -request_firmware (&fw, dev_priv->csr.fw_path, &dev_priv->drm.pdev->dev); +request_firmware (&fw, dev_priv->csr.fw_path, dev_priv->drm.dev);parse_csr_fw (dev_priv, fw);if (dev_priv->csr.dmc_payload) {drivers/gpu/drm/i915/display/intel_dsi_vbt.c +1
-1@@ -425,7 +425,7 @@ static void i2c_acpi_find_adapter(struct intel_dsi *intel_dsi, const u16 slave_addr) {struct drm_device *drm_dev = intel_dsi->base.base.dev; -struct device *dev = &drm_dev->pdev->dev; +struct device *dev = drm_dev->dev;struct acpi_device *acpi_dev;struct list_head resource_list;struct i2c_adapter_lookup lookup;drivers/gpu/drm/i915/display/intel_fbdev.c +1
-1@@ -167,7 +167,7 @@ static int intelfb_create(struct drm_fb_helper *helper,struct intel_framebuffer *intel_fb = ifbdev->fb;struct drm_device *dev = helper->dev;struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct i915_ggtt *ggtt = &dev_priv->ggtt;const struct i915_ggtt_view view = { .type =I915_GGTT_VIEW_NORMAL ,drivers/gpu/drm/i915/display/intel_gmbus.c +1
-1@@ -840,7 +840,7 @@ static const struct i2c_lock_operations gmbus_lock_ops = {*/ int intel_gmbus_setup (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_gmbus *bus;unsigned int pin;int ret;drivers/gpu/drm/i915/display/intel_lpe_audio.c +3
-2@@ -80,6 +80,7 @@ static struct platform_device * lpe_audio_platdev_create(struct drm_i915_private *dev_priv) {struct drm_device *dev = &dev_priv->drm; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -99,9 +100,9 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[0 ].flags =IORESOURCE_IRQ ; rsc[0 ].name ="hdmi-lpe-audio-irq" ; - rsc[1 ].start =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].start =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE ; - rsc[1 ].end =pci_resource_start (dev->pdev,0 ) + + rsc[1 ].end =pci_resource_start (pdev,0 ) +I915_HDMI_LPE_AUDIO_BASE +I915_HDMI_LPE_AUDIO_SIZE -1 ; rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ;drivers/gpu/drm/i915/display/intel_opregion.c +3
-3@@ -247,7 +247,7 @@ static int swsci(struct drm_i915_private *dev_priv, u32 function, u32 parm, u32 *parm_out) { struct opregion_swsci *swsci = dev_priv->opregion.swsci; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 main_function, sub_function, scic;u16 swsci_val;u32 dslp;@@ -807,7 +807,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)if (!name || !*name)return -ENOENT ; - ret =request_firmware (&fw, name, &dev_priv->drm.pdev->dev); + ret =request_firmware (&fw, name, dev_priv->drm.dev);if (ret) { drm_err(&dev_priv->drm, "Requesting VBT firmware \"%s\" failed (%d)\n",@@ -840,7 +840,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)int intel_opregion_setup (struct drm_i915_private *dev_priv) {struct intel_opregion *opregion = &dev_priv->opregion; -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u32 asls, mboxes;char buf[sizeof (OPREGION_SIGNATURE )];int err =0 ;drivers/gpu/drm/i915/display/intel_overlay.c +1
-1@@ -201,7 +201,7 @@ struct intel_overlay {static void i830_overlay_clock_gating (struct drm_i915_private *dev_priv,bool enable) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u8 val;/* WA_OVERLAY_CLKGATE:alm */ drivers/gpu/drm/i915/display/intel_panel.c +2
-2@@ -557,7 +557,7 @@ static u32 i9xx_get_backlight(struct intel_connector *connector)if (panel->backlight.combination_mode) {u8 lbpc; -pci_read_config_byte (dev_priv->drm.pdev,LBPC , &lbpc); +pci_read_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , &lbpc); val *= lbpc; }@@ -631,7 +631,7 @@ static void i9xx_set_backlight(const struct drm_connector_state *conn_state, u32 lbpc = level *0xfe / panel->backlight.max +1 ; level /= lbpc; -pci_write_config_byte (dev_priv->drm.pdev,LBPC , lbpc); +pci_write_config_byte (to_pci_dev (dev_priv->drm.dev),LBPC , lbpc); }if (IS_GEN (dev_priv,4 )) {drivers/gpu/drm/i915/display/intel_quirks.c +1
-1@@ -160,7 +160,7 @@ static struct intel_quirk intel_quirks[] = {void intel_init_quirks (struct drm_i915_private *i915) { -struct pci_dev *d = i915->drm.pdev; +struct pci_dev *d =to_pci_dev (i915->drm.dev);int i;for (i =0 ; i <ARRAY_SIZE (intel_quirks); i++) {drivers/gpu/drm/i915/display/intel_sdvo.c +1
-1@@ -3281,7 +3281,7 @@ static bool intel_sdvo_init_ddc_proxy(struct intel_sdvo *sdvo, struct drm_i915_private *dev_priv) { - struct pci_dev *pdev = dev_priv->drm.pdev; + struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev); sdvo->ddc.owner =THIS_MODULE ; sdvo->ddc.class =I2C_CLASS_DDC ;drivers/gpu/drm/i915/display/intel_vga.c +4
-4@@ -25,7 +25,7 @@ static i915_reg_t intel_vga_cntrl_reg(struct drm_i915_private *i915)/* Disable the VGA plane that we never use */ void intel_vga_disable (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_reg_t vga_reg =intel_vga_cntrl_reg (dev_priv);u8 sr1;@@ -76,7 +76,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)void intel_vga_reset_io_mem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* * After we re-enable the power well, if we touch VGA register 0x3d5 @@ -136,7 +136,7 @@ intel_vga_set_decode(void *cookie, bool enable_decode)int intel_vga_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int ret;/* @@ -156,7 +156,7 @@ int intel_vga_register(struct drm_i915_private *i915)void intel_vga_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_client_register (pdev,NULL ,NULL ,NULL ); }drivers/gpu/drm/i915/gem/i915_gem_phys.c +3
-3@@ -35,7 +35,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)* to handle all possible callers, and given typical object sizes, * the alignment of the buddy allocation will naturally match. */ - vaddr =dma_alloc_coherent (&obj->base.dev->pdev->dev, + vaddr =dma_alloc_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), &dma,GFP_KERNEL );if (!vaddr)@@ -83,7 +83,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj) err_st:kfree (st); err_pci: -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma);return -ENOMEM ;@@ -129,7 +129,7 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,sg_free_table (pages);kfree (pages); -dma_free_coherent (&obj->base.dev->pdev->dev, +dma_free_coherent (obj->base.dev->dev,roundup_pow_of_two (obj->base.size), vaddr, dma); }drivers/gpu/drm/i915/gem/i915_gem_shmem.c +1
-1@@ -172,7 +172,7 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj) max_segment =PAGE_SIZE ; goto rebuild_st; }else { -dev_warn (&i915->drm.pdev->dev, +dev_warn (i915->drm.dev,"Failed to DMA remap %lu pages\n" , page_count); goto err_pages;drivers/gpu/drm/i915/gt/intel_engine_cs.c +1
-1@@ -1228,7 +1228,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)/* Waiting to drain ELSP? */ if (execlists_active (&engine->execlists)) { -synchronize_hardirq (engine->i915->drm.pdev->irq); +synchronize_hardirq (to_pci_dev (engine->i915->drm.dev)->irq);intel_engine_flush_submission (engine);drivers/gpu/drm/i915/gt/intel_ggtt.c +5
-5@@ -760,7 +760,7 @@ static unsigned int chv_get_total_gtt_size(u16 gmch_ctrl)static int ggtt_probe_common (struct i915_ggtt *ggtt,u64 size) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);phys_addr_t phys_addr;int ret;@@ -830,7 +830,7 @@ static struct resource pci_resource(struct pci_dev *pdev, int bar)static int gen8_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;@@ -974,7 +974,7 @@ static u64 iris_pte_encode(dma_addr_t addr,static int gen6_gmch_probe (struct i915_ggtt *ggtt) {struct drm_i915_private *i915 = ggtt->vm.i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);unsigned int size;u16 snb_gmch_ctl;@@ -1037,7 +1037,7 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt)phys_addr_t gmadr_base;int ret; - ret =intel_gmch_probe (i915->bridge_dev, i915->drm.pdev,NULL ); + ret =intel_gmch_probe (i915->bridge_dev,to_pci_dev (i915->drm.dev),NULL );if (!ret) {drm_err (&i915->drm,"failed to set up gmch\n" );return -EIO ;@@ -1077,7 +1077,7 @@ static int ggtt_probe_hw(struct i915_ggtt *ggtt, struct intel_gt *gt) ggtt->vm.gt = gt; ggtt->vm.i915 = i915; - ggtt->vm.dma = &i915->drm.pdev->dev; + ggtt->vm.dma = i915->drm.dev;if (INTEL_GEN (i915) <=5 ) ret =i915_gmch_probe (ggtt);drivers/gpu/drm/i915/gt/intel_ppgtt.c +1
-1@@ -301,7 +301,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt) ppgtt->vm.gt = gt; ppgtt->vm.i915 = i915; - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev; ppgtt->vm.total =BIT_ULL (INTEL_INFO (i915)->ppgtt_size);i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );drivers/gpu/drm/i915/gt/intel_rc6.c +2
-2@@ -485,14 +485,14 @@ static bool rc6_supported(struct intel_rc6 *rc6)static void rpm_get (struct intel_rc6 *rc6) {GEM_BUG_ON (rc6->wakeref); -pm_runtime_get_sync (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_get_sync (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = true; }static void rpm_put (struct intel_rc6 *rc6) {GEM_BUG_ON (!rc6->wakeref); -pm_runtime_put (&rc6_to_i915 (rc6)->drm.pdev->dev); +pm_runtime_put (rc6_to_i915 (rc6)->drm.dev); rc6->wakeref = false; }drivers/gpu/drm/i915/gt/intel_reset.c +3
-3@@ -180,7 +180,7 @@ static int i915_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);int err;/* Assert reset for at least 20 usec, and wait for acknowledgement. */ @@ -209,7 +209,7 @@ static int g33_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);pci_write_config_byte (pdev,I915_GDRST ,GRDOM_RESET_ENABLE );return wait_for_atomic (g4x_reset_complete (pdev),50 );@@ -219,7 +219,7 @@ static int g4x_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, unsigned int retry) { -struct pci_dev *pdev = gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);struct intel_uncore *uncore = gt->uncore;int ret;drivers/gpu/drm/i915/gvt/cfg_space.c +3
-2@@ -374,6 +374,7 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, bool primary) {struct intel_gvt *gvt = vgpu->gvt; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);const struct intel_gvt_device_info *info = &gvt->device_info;u16 *gmch_ctl;u8 next;@@ -407,9 +408,9 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,memset (vgpu_cfg_space (vgpu) +INTEL_GVT_PCI_OPREGION ,0 ,4 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_GTTMMIO ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,0 ); +pci_resource_len (pdev,0 ); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE ].size = -pci_resource_len (gvt->gt->i915->drm.pdev,2 ); +pci_resource_len (pdev,2 );memset (vgpu_cfg_space (vgpu) +PCI_ROM_ADDRESS ,0 ,4 );drivers/gpu/drm/i915/gvt/firmware.c +5
-5@@ -76,7 +76,7 @@ static int mmio_snapshot_handler(struct intel_gvt *gvt, u32 offset, void *data)static int expose_firmware_sysfs (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;void *firmware;void *p;@@ -127,7 +127,7 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)static void clean_firmware_sysfs (struct intel_gvt *gvt) { -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);device_remove_bin_file (&pdev->dev, &firmware_attr);vfree (firmware_attr.private);@@ -151,7 +151,7 @@ static int verify_firmware(struct intel_gvt *gvt, const struct firmware *fw) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct gvt_firmware_header *h;unsigned long id, crc32_start;const void *mem;@@ -205,7 +205,7 @@ static int verify_firmware(struct intel_gvt *gvt,int intel_gvt_load_firmware (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev);struct intel_gvt_firmware *firmware = &gvt->firmware;struct gvt_firmware_header *h;const struct firmware *fw;@@ -240,7 +240,7 @@ int intel_gvt_load_firmware(struct intel_gvt *gvt)gvt_dbg_core ("request hw state firmware %s...\n" , path); - ret =request_firmware (&fw, path, &gvt->gt->i915->drm.pdev->dev); + ret =request_firmware (&fw, path, gvt->gt->i915->drm.dev);kfree (path);if (ret)drivers/gpu/drm/i915/gvt/gtt.c +6
-6@@ -737,7 +737,7 @@ static int detach_oos_page(struct intel_vgpu *vgpu,static void ppgtt_free_spt (struct intel_vgpu_ppgtt_spt *spt) { -struct device *kdev = &spt->vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = spt->vgpu->gvt->gt->i915->drm.dev;trace_spt_free (spt->vgpu->id, spt, spt->guest_page.type);@@ -822,7 +822,7 @@ static int reclaim_one_ppgtt_mm(struct intel_gvt *gvt);static struct intel_vgpu_ppgtt_spt *ppgtt_alloc_spt (struct intel_vgpu *vgpu,enum intel_gvt_gtt_type type) { -struct device *kdev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *kdev = vgpu->gvt->gt->i915->drm.dev;struct intel_vgpu_ppgtt_spt *spt =NULL ;dma_addr_t daddr;int ret;@@ -2376,7 +2376,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu, vgpu->gvt->device_info.gtt_entry_size_shift;void *scratch_pt;int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr; if (drm_WARN_ON(&i915->drm,@@ -2434,7 +2434,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu,static int release_scratch_page_tree (struct intel_vgpu *vgpu) {int i; -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_addr_t daddr;for (i =GTT_TYPE_PPGTT_PTE_PT ; i <GTT_TYPE_MAX ; i++) {@@ -2706,7 +2706,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt) {int ret;void *page; -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr;gvt_dbg_core ("init gtt\n" );@@ -2755,7 +2755,7 @@ int intel_gvt_init_gtt(struct intel_gvt *gvt)*/ void intel_gvt_clean_gtt (struct intel_gvt *gvt) { -struct device *dev = &gvt->gt->i915->drm.pdev->dev; +struct device *dev = gvt->gt->i915->drm.dev;dma_addr_t daddr = (dma_addr_t)(gvt->gtt.scratch_mfn <<I915_GTT_PAGE_SHIFT );drivers/gpu/drm/i915/gvt/gvt.c +3
-3@@ -50,7 +50,7 @@ static struct intel_vgpu_type *intel_gvt_find_vgpu_type(struct intel_gvt *gvt, const char *name) {const char *driver_name = -dev_driver_string (&gvt->gt->i915->drm.pdev->dev); +dev_driver_string (gvt->gt->i915->drm.dev);int i; name +=strlen (driver_name) +1 ;@@ -189,7 +189,7 @@ static const struct intel_gvt_ops intel_gvt_ops = {static void init_device_info (struct intel_gvt *gvt) {struct intel_gvt_device_info *info = &gvt->device_info; -struct pci_dev *pdev = gvt->gt->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (gvt->gt->i915->drm.dev); info->max_support_vgpus =8 ; info->cfg_space_size =PCI_CFG_SPACE_EXP_SIZE ;@@ -376,7 +376,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915)intel_gvt_debugfs_init (gvt);gvt_dbg_core ("gvt device initialization is done\n" ); - intel_gvt_host.dev = &i915->drm.pdev->dev; + intel_gvt_host.dev = i915->drm.dev; intel_gvt_host.initialized = true;return 0 ;drivers/gpu/drm/i915/gvt/kvmgt.c +2
-2@@ -221,7 +221,7 @@ static int gvt_pin_guest_page(struct intel_vgpu *vgpu, unsigned long gfn,static int gvt_dma_map_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t *dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;struct page *page =NULL ;int ret;@@ -244,7 +244,7 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, unsigned long gfn,static void gvt_dma_unmap_page (struct intel_vgpu *vgpu,unsigned long gfn,dma_addr_t dma_addr,unsigned long size) { -struct device *dev = &vgpu->gvt->gt->i915->drm.pdev->dev; +struct device *dev = vgpu->gvt->gt->i915->drm.dev;dma_unmap_page (dev, dma_addr, size,PCI_DMA_BIDIRECTIONAL );gvt_unpin_guest_page (vgpu, gfn, size);drivers/gpu/drm/i915/i915_debugfs.c +1
-1@@ -1275,7 +1275,7 @@ static int i915_llc(struct seq_file *m, void *data)static int i915_runtime_pm_status (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);if (!HAS_RUNTIME_PM (dev_priv))seq_puts (m,"Runtime power management not supported\n" );drivers/gpu/drm/i915/i915_drv.c +9
-11@@ -91,7 +91,7 @@ static const struct drm_driver driver;static int i915_get_bridge_dev (struct drm_i915_private *dev_priv) { -int domain =pci_domain_nr (dev_priv->drm.pdev->bus); +int domain =pci_domain_nr (to_pci_dev (dev_priv->drm.dev)->bus); dev_priv->bridge_dev =pci_get_domain_bus_and_slot (domain,0 ,PCI_DEVFN (0 ,0 ));@@ -458,7 +458,6 @@ static void intel_sanitize_options(struct drm_i915_private *dev_priv)*/ static int i915_set_dma_info (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev;unsigned int mask_size =INTEL_INFO (i915)->dma_mask_size;int ret;@@ -468,9 +467,9 @@ static int i915_set_dma_info(struct drm_i915_private *i915)* We don't have a max segment size, so set it to the max so sg's * debugging layer doesn't complain */ -dma_set_max_seg_size (&pdev->dev,UINT_MAX ); +dma_set_max_seg_size (i915->drm.dev,UINT_MAX ); - ret =dma_set_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;@@ -490,7 +489,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)if (IS_I965G (i915) ||IS_I965GM (i915)) mask_size =32 ; - ret =dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (mask_size)); + ret =dma_set_coherent_mask (i915->drm.dev,DMA_BIT_MASK (mask_size));if (ret) goto mask_err;@@ -510,7 +509,7 @@ static int i915_set_dma_info(struct drm_i915_private *i915)*/ static int i915_driver_hw_probe (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;if (i915_inject_probe_failure (dev_priv))@@ -642,7 +641,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)*/ static void i915_driver_hw_remove (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);i915_perf_fini (dev_priv);@@ -792,7 +791,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)if (IS_ERR (i915))return i915; - i915->drm.pdev = pdev;pci_set_drvdata (pdev, i915);/* Device parameters start as a copy of module parameters. */ @@ -1094,7 +1092,7 @@ static int i915_drm_prepare(struct drm_device *dev)static int i915_drm_suspend (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);pci_power_t opregion_target_state;disable_rpm_wakeref_asserts (&dev_priv->runtime_pm);@@ -1151,7 +1149,7 @@ get_suspend_mode(struct drm_i915_private *dev_priv, bool hibernate)static int i915_drm_suspend_late (struct drm_device *dev,bool hibernation) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;int ret;@@ -1279,7 +1277,7 @@ static int i915_drm_resume(struct drm_device *dev)static int i915_drm_resume_early (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);int ret;/* drivers/gpu/drm/i915/i915_drv.h +1
-1@@ -1295,7 +1295,7 @@ static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)#define INTEL_DEVID (dev_priv) (RUNTIME_INFO(dev_priv)->device_id)#define REVID_FOREVER 0xff -#define INTEL_REVID (dev_priv) ((dev_priv)->drm.pdev->revision) +#define INTEL_REVID (dev_priv) (to_pci_dev((dev_priv)->drm.dev)->revision)#define INTEL_GEN_MASK (s, e) ( \ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \drivers/gpu/drm/i915/i915_gem_gtt.c +2
-2@@ -28,7 +28,7 @@ int i915_gem_gtt_prepare_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) { do { - if (dma_map_sg_attrs(&obj->base.dev->pdev->dev, + if (dma_map_sg_attrs(obj->base.dev->dev, pages->sgl, pages->nents, PCI_DMA_BIDIRECTIONAL, DMA_ATTR_SKIP_CPU_SYNC |@@ -56,7 +56,7 @@ void i915_gem_gtt_finish_pages(struct drm_i915_gem_object *obj, struct sg_table *pages) {struct drm_i915_private *dev_priv =to_i915 (obj->base.dev); -struct device *kdev = &dev_priv->drm.pdev->dev; +struct device *kdev = dev_priv->drm.dev;struct i915_ggtt *ggtt = &dev_priv->ggtt;if (unlikely (ggtt->do_idle_maps)) {drivers/gpu/drm/i915/i915_getparam.c +3
-2@@ -12,6 +12,7 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {struct drm_i915_private *i915 =to_i915 (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);const struct sseu_dev_info *sseu = &i915->gt.info.sseu;drm_i915_getparam_t *param = data;int value;@@ -24,10 +25,10 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data,/* Reject all old ums/dri params. */ return -ENODEV ;case I915_PARAM_CHIPSET_ID : - value = i915->drm.pdev->device; + value = pdev->device;break ;case I915_PARAM_REVISION : - value = i915->drm.pdev->revision; + value = pdev->revision;break ;case I915_PARAM_NUM_FENCES_AVAIL : value = i915->ggtt.num_fences;drivers/gpu/drm/i915/i915_gpu_error.c +1
-1@@ -644,7 +644,7 @@ static void err_print_params(struct drm_i915_error_state_buf *m,static void err_print_pciid (struct drm_i915_error_state_buf *m,struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);err_printf (m,"PCI ID: 0x%04x\n" , pdev->device);err_printf (m,"PCI Revision: 0x%02x\n" , pdev->revision);drivers/gpu/drm/i915/i915_irq.c +3
-3@@ -4354,7 +4354,7 @@ static void intel_irq_postinstall(struct drm_i915_private *dev_priv)*/ int intel_irq_install (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;int ret;/* @@ -4389,7 +4389,7 @@ int intel_irq_install(struct drm_i915_private *dev_priv)*/ void intel_irq_uninstall (struct drm_i915_private *dev_priv) { -int irq = dev_priv->drm.pdev->irq; +int irq =to_pci_dev (dev_priv->drm.dev)->irq;/* * FIXME we can get called twice during driver probe @@ -4449,5 +4449,5 @@ bool intel_irqs_enabled(struct drm_i915_private *dev_priv)void intel_synchronize_irq (struct drm_i915_private *i915) { -synchronize_irq (i915->drm.pdev->irq); +synchronize_irq (to_pci_dev (i915->drm.dev)->irq); }drivers/gpu/drm/i915/i915_pmu.c +3
-2@@ -427,7 +427,8 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)static u64 count_interrupts (struct drm_i915_private *i915) {/* open-coded kstat_irqs() */ -struct irq_desc *desc =irq_to_desc (i915->drm.pdev->irq); +struct pci_dev *pdev =to_pci_dev (i915->drm.dev); +struct irq_desc *desc =irq_to_desc (pdev->irq);u64 sum =0 ;int cpu;@@ -1117,7 +1118,7 @@ static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)static bool is_igp (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);/* IGP is 0000:00:02.0 */ return pci_domain_nr(pdev->bus) == 0 &&drivers/gpu/drm/i915/i915_suspend.c +2
-2@@ -84,7 +84,7 @@ static void intel_restore_swf(struct drm_i915_private *dev_priv)void i915_save_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);/* Display arbitration control */ if (INTEL_GEN (dev_priv) <=4 )@@ -99,7 +99,7 @@ void i915_save_display(struct drm_i915_private *dev_priv)void i915_restore_display (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);intel_restore_swf (dev_priv);drivers/gpu/drm/i915/i915_switcheroo.c +2
-2@@ -54,14 +54,14 @@ static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {int i915_switcheroo_register (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);return vga_switcheroo_register_client (pdev, &i915_switcheroo_ops, false); }void i915_switcheroo_unregister (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);vga_switcheroo_unregister_client (pdev); }drivers/gpu/drm/i915/i915_vgpu.c +1
-1@@ -61,7 +61,7 @@*/ void intel_vgpu_detect (struct drm_i915_private *dev_priv) { -struct pci_dev *pdev = dev_priv->drm.pdev; +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);u64 magic;u16 version_major;void __iomem *shared_area;drivers/gpu/drm/i915/intel_device_info.c +1
-1@@ -348,7 +348,7 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915) }if (IS_TIGERLAKE (i915)) { -struct pci_dev *root, *pdev = i915->drm.pdev; +struct pci_dev *root, *pdev =to_pci_dev (i915->drm.dev); root =list_first_entry (&pdev->bus->devices,typeof (*root), bus_list);drivers/gpu/drm/i915/intel_region_lmem.c +4
-4@@ -26,12 +26,12 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem)if (ret)return ret; - mem->remap_addr =dma_map_resource (&i915->drm.pdev->dev, + mem->remap_addr =dma_map_resource (i915->drm.dev, mem->region.start, mem->fake_mappable.size,PCI_DMA_BIDIRECTIONAL ,DMA_ATTR_FORCE_CONTIGUOUS ); -if (dma_mapping_error (&i915->drm.pdev->dev, mem->remap_addr)) { +if (dma_mapping_error (i915->drm.dev, mem->remap_addr)) {drm_mm_remove_node (&mem->fake_mappable);return -EINVAL ; }@@ -56,7 +56,7 @@ static void release_fake_lmem_bar(struct intel_memory_region *mem)drm_mm_remove_node (&mem->fake_mappable); - dma_unmap_resource(&mem->i915->drm.pdev->dev, + dma_unmap_resource(mem->i915->drm.dev, mem->remap_addr, mem->fake_mappable.size, PCI_DMA_BIDIRECTIONAL,@@ -104,7 +104,7 @@ const struct intel_memory_region_ops intel_region_lmem_ops = {struct intel_memory_region *intel_setup_fake_lmem (struct drm_i915_private *i915) { -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct intel_memory_region *mem;resource_size_t mappable_end;resource_size_t io_start;drivers/gpu/drm/i915/intel_runtime_pm.c +1
-1@@ -625,7 +625,7 @@ void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm) {struct drm_i915_private *i915 = container_of(rpm, struct drm_i915_private, runtime_pm); -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);struct device *kdev = &pdev->dev; rpm->kdev = kdev;drivers/gpu/drm/i915/intel_uncore.c +2
-2@@ -1780,7 +1780,7 @@ static int i915_pmic_bus_access_notifier(struct notifier_block *nb,static int uncore_mmio_setup (struct intel_uncore *uncore) {struct drm_i915_private *i915 = uncore->i915; -struct pci_dev *pdev = i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (i915->drm.dev);int mmio_bar;int mmio_size;@@ -1812,7 +1812,7 @@ static int uncore_mmio_setup(struct intel_uncore *uncore)static void uncore_mmio_cleanup (struct intel_uncore *uncore) { -struct pci_dev *pdev = uncore->i915->drm.pdev; +struct pci_dev *pdev =to_pci_dev (uncore->i915->drm.dev);pci_iounmap (pdev, uncore->regs); }drivers/gpu/drm/i915/selftests/mock_gem_device.c +0
-1@@ -148,7 +148,6 @@ struct drm_i915_private *mock_gem_device(void) }pci_set_drvdata (pdev, i915); - i915->drm.pdev = pdev;dev_pm_domain_set (&pdev->dev, &pm_domain);pm_runtime_enable (&pdev->dev);drivers/gpu/drm/i915/selftests/mock_gtt.c +1
-1@@ -74,7 +74,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name) ppgtt->vm.i915 = i915; ppgtt->vm.total =round_down (U64_MAX ,PAGE_SIZE ); ppgtt->vm.file =ERR_PTR (-ENODEV ); - ppgtt->vm.dma = &i915->drm.pdev->dev; + ppgtt->vm.dma = i915->drm.dev;i915_address_space_init (&ppgtt->vm,VM_CLASS_PPGTT );Signature · 1 line
2.29.2
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Thomas Zimmermann
maintainerPATCH 8/15 drm/mgag200: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert mgag200 to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/mgag200/mgag200_drv.c | 20 +++++++++++--------- drivers/gpu/drm/mgag200/mgag200_i2c.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mm.c | 10 ++++++---- 3 files changed, 18 insertions(+), 14 deletions(-)
drivers/gpu/drm/mgag200/mgag200_drv.c +11 -9
@@ -47,10 +47,11 @@ static const struct drm_driver mgag200_driver = {static bool mgag200_has_sgram (struct mga_device *mdev) {struct drm_device *dev = &mdev->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 option;int ret; - ret =pci_read_config_dword (dev->pdev,PCI_MGA_OPTION , &option); + ret =pci_read_config_dword (pdev,PCI_MGA_OPTION , &option);if (drm_WARN (dev, ret,"failed to read PCI config dword: %d\n" , ret))return false;
@@ -60,6 +61,7 @@ static bool mgag200_has_sgram(struct mga_device *mdev)static int mgag200_regs_init (struct mga_device *mdev) {struct drm_device *dev = &mdev->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);u32 option, option2;u8 crtcext3;
@@ -99,13 +101,13 @@ static int mgag200_regs_init(struct mga_device *mdev) }if (option) -pci_write_config_dword (dev->pdev,PCI_MGA_OPTION , option); +pci_write_config_dword (pdev,PCI_MGA_OPTION , option);if (option2) -pci_write_config_dword (dev->pdev,PCI_MGA_OPTION2 , option2); +pci_write_config_dword (pdev,PCI_MGA_OPTION2 , option2);/* BAR 1 contains registers */ - mdev->rmmio_base =pci_resource_start (dev->pdev,1 ); - mdev->rmmio_size =pci_resource_len (dev->pdev,1 ); + mdev->rmmio_base =pci_resource_start (pdev,1 ); + mdev->rmmio_size =pci_resource_len (pdev,1 );if (!devm_request_mem_region (dev->dev, mdev->rmmio_base, mdev->rmmio_size,"mgadrmfb_mmio" )) {
@@ -113,7 +115,7 @@ static int mgag200_regs_init(struct mga_device *mdev)return -ENOMEM ; } - mdev->rmmio =pcim_iomap (dev->pdev,1 ,0 ); + mdev->rmmio =pcim_iomap (pdev,1 ,0 );if (mdev->rmmio ==NULL )return -ENOMEM ;
@@ -218,6 +220,7 @@ static void mgag200_g200_interpret_bios(struct mga_device *mdev,static void mgag200_g200_init_refclk (struct mga_device *mdev) {struct drm_device *dev = &mdev->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);unsigned char __iomem *rom;unsigned char *bios;size_t size;
@@ -226,7 +229,7 @@ static void mgag200_g200_init_refclk(struct mga_device *mdev) mdev->model.g200.pclk_max =230000 ; mdev->model.g200.ref_clk =27050 ; - rom =pci_map_rom (dev->pdev, &size); + rom =pci_map_rom (pdev, &size);if (!rom)return ;
@@ -244,7 +247,7 @@ static void mgag200_g200_init_refclk(struct mga_device *mdev)vfree (bios); out: -pci_unmap_rom (dev->pdev, rom); +pci_unmap_rom (pdev, rom); }static void mgag200_g200se_init_unique_id (struct mga_device *mdev)
@@ -301,7 +304,6 @@ mgag200_device_create(struct pci_dev *pdev, unsigned long flags)return mdev; dev = &mdev->base; - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =mgag200_device_init (mdev, flags);
drivers/gpu/drm/mgag200/mgag200_i2c.c +1 -1
@@ -126,7 +126,7 @@ struct mga_i2c_chan *mgag200_i2c_create(struct drm_device *dev) i2c->clock = clock; i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c);snprintf (i2c->adapter.name,sizeof (i2c->adapter.name),"mga i2c" );
drivers/gpu/drm/mgag200/mgag200_mm.c +6 -4
@@ -78,11 +78,12 @@ static size_t mgag200_probe_vram(struct mga_device *mdev, void __iomem *mem,static void mgag200_mm_release (struct drm_device *dev,void *ptr) {struct mga_device *mdev =to_mga_device (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev); mdev->vram_fb_available =0 ;iounmap (mdev->vram); -arch_io_free_memtype_wc (pci_resource_start (dev->pdev,0 ), -pci_resource_len (dev->pdev,0 )); +arch_io_free_memtype_wc (pci_resource_start (pdev,0 ), +pci_resource_len (pdev,0 ));arch_phys_wc_del (mdev->fb_mtrr); mdev->fb_mtrr =0 ; }
@@ -90,6 +91,7 @@ static void mgag200_mm_release(struct drm_device *dev, void *ptr)int mgag200_mm_init (struct mga_device *mdev) {struct drm_device *dev = &mdev->base; +struct pci_dev *pdev =to_pci_dev (dev->dev);u8 misc;resource_size_t start, len;int ret;
@@ -102,8 +104,8 @@ int mgag200_mm_init(struct mga_device *mdev)WREG8 (MGA_MISC_OUT , misc);/* BAR 0 is VRAM */ - start =pci_resource_start (dev->pdev,0 ); - len =pci_resource_len (dev->pdev,0 ); + start =pci_resource_start (pdev,0 ); + len =pci_resource_len (pdev,0 );if (!devm_request_mem_region (dev->dev, start, len,"mgadrmfb_vram" )) {drm_err (dev,"can't reserve VRAM\n" );
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 9/15 drm/nouveau: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert nouveau to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 12 +++++++----- drivers/gpu/drm/nouveau/dispnv04/disp.h | 14 ++++++++------ drivers/gpu/drm/nouveau/dispnv04/hw.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_abi16.c | 7 ++++--- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 11 ++++++++--- drivers/gpu/drm/nouveau/nouveau_connector.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 6 ++++-- drivers/gpu/drm/nouveau/nouveau_vga.c | 20 ++++++++++++-------- 10 files changed, 58 insertions(+), 39 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/arb.c +7 -5
@@ -200,16 +200,17 @@ nv04_update_arb(struct drm_device *dev, int VClk, int bpp,int MClk =nouveau_hw_get_clock (dev,PLL_MEMORY );int NVClk =nouveau_hw_get_clock (dev,PLL_CORE );uint32_t cfg1 =nvif_rd32 (device,NV04_PFB_CFG1 ); +struct pci_dev *pdev =to_pci_dev (dev->dev); sim_data.pclk_khz = VClk; sim_data.mclk_khz = MClk; sim_data.nvclk_khz = NVClk; sim_data.bpp = bpp; sim_data.two_heads =nv_two_heads (dev); -if ((dev->pdev->device &0xffff ) ==0x01a0 /*CHIPSET_NFORCE*/ || - (dev->pdev->device &0xffff ) ==0x01f0 /*CHIPSET_NFORCE2*/ ) { +if ((pdev->device &0xffff ) ==0x01a0 /*CHIPSET_NFORCE*/ || + (pdev->device &0xffff ) ==0x01f0 /*CHIPSET_NFORCE2*/ ) {uint32_t type; -int domain =pci_domain_nr (dev->pdev->bus); +int domain =pci_domain_nr (pdev->bus);pci_read_config_dword (pci_get_domain_bus_and_slot (domain,0 ,1 ),0x7c , &type);
@@ -251,11 +252,12 @@ void nouveau_calc_arb(struct drm_device *dev, int vclk, int bpp, int *burst, int *lwm) { struct nouveau_drm *drm = nouveau_drm(dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);if (drm->client.device.info.family <NV_DEVICE_INFO_V0_KELVIN )nv04_update_arb (dev, vclk, bpp, burst, lwm); -else if ((dev->pdev->device &0xfff0 ) ==0x0240 /*CHIPSET_C51*/ || - (dev->pdev->device &0xfff0 ) ==0x03d0 /*CHIPSET_C512*/ ) { +else if ((pdev->device &0xfff0 ) ==0x0240 /*CHIPSET_C51*/ || + (pdev->device &0xfff0 ) ==0x03d0 /*CHIPSET_C512*/ ) { *burst =128 ; *lwm =0x0480 ; }else
drivers/gpu/drm/nouveau/dispnv04/disp.h +8 -6
@@ -130,7 +130,7 @@ static inline bool nv_two_heads(struct drm_device *dev) {struct nouveau_drm *drm =nouveau_drm (dev); -const int impl = dev->pdev->device &0x0ff0 ; +const int impl =to_pci_dev (dev->dev)->device &0x0ff0 ;if (drm->client.device.info.family >=NV_DEVICE_INFO_V0_CELSIUS && impl !=0x0100 && impl !=0x0150 && impl !=0x01a0 && impl !=0x0200 )
@@ -142,14 +142,14 @@ nv_two_heads(struct drm_device *dev)static inline bool nv_gf4_disp_arch (struct drm_device *dev) { -return nv_two_heads (dev) && (dev->pdev->device &0x0ff0 ) !=0x0110 ; +return nv_two_heads (dev) && (to_pci_dev (dev->dev)->device &0x0ff0 ) !=0x0110 ; }static inline bool nv_two_reg_pll (struct drm_device *dev) {struct nouveau_drm *drm =nouveau_drm (dev); -const int impl = dev->pdev->device &0x0ff0 ; +const int impl =to_pci_dev (dev->dev)->device &0x0ff0 ;if (impl ==0x0310 || impl ==0x0340 || drm->client.device.info.family >=NV_DEVICE_INFO_V0_CURIE )return true;
@@ -160,9 +160,11 @@ static inline bool nv_match_device(struct drm_device *dev, unsigned device, unsigned sub_vendor, unsigned sub_device) { - return dev->pdev->device == device && - dev->pdev->subsystem_vendor == sub_vendor && - dev->pdev->subsystem_device == sub_device; + struct pci_dev *pdev = to_pci_dev(dev->dev); + +return pdev->device == device && + pdev->subsystem_vendor == sub_vendor && + pdev->subsystem_device == sub_device; }#include <subdev/bios/init.h>
drivers/gpu/drm/nouveau/dispnv04/hw.c +6 -4
@@ -214,14 +214,15 @@ nouveau_hw_pllvals_to_clk(struct nvkm_pll_vals *pv)int nouveau_hw_get_clock (struct drm_device *dev,enum nvbios_pll_type plltype) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct nvkm_pll_vals pllvals;int ret;int domain; - domain =pci_domain_nr (dev->pdev->bus); + domain =pci_domain_nr (pdev->bus);if (plltype ==PLL_MEMORY && - (dev->pdev->device &0x0ff0 ) ==CHIPSET_NFORCE ) { + (pdev->device &0x0ff0 ) ==CHIPSET_NFORCE ) {uint32_t mpllP;pci_read_config_dword (pci_get_domain_bus_and_slot (domain,0 ,3 ),0x6c , &mpllP);
@@ -232,7 +233,7 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)return 400000 / mpllP; }else if (plltype ==PLL_MEMORY && - (dev->pdev->device &0xff0 ) ==CHIPSET_NFORCE2 ) { + (pdev->device &0xff0 ) ==CHIPSET_NFORCE2 ) {uint32_t clock; pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 5),
@@ -309,6 +310,7 @@ void nouveau_hw_save_vga_fonts(struct drm_device *dev, bool save) {struct nouveau_drm *drm =nouveau_drm (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);uint8_t misc, gr4, gr5, gr6, seq2, seq4;bool graphicsmode;unsigned plane;
@@ -327,7 +329,7 @@ nouveau_hw_save_vga_fonts(struct drm_device *dev, bool save)NV_INFO (drm,"%sing VGA fonts\n" , save ?"Sav" :"Restor" );/* map first 64KiB of VRAM, holds VGA fonts etc */ - iovram =ioremap (pci_resource_start (dev->pdev,1 ),65536 ); + iovram =ioremap (pci_resource_start (pdev,1 ),65536 );if (!iovram) {NV_ERROR (drm,"Failed to map VRAM, " "cannot save/restore VGA fonts.\n" );
drivers/gpu/drm/nouveau/nouveau_abi16.c +4 -3
@@ -181,6 +181,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)struct nvif_device *device = &drm->client.device;struct nvkm_gr *gr =nvxx_gr (device);struct drm_nouveau_getparam *getparam = data; +struct pci_dev *pdev =to_pci_dev (dev->dev);switch (getparam->param) {case NOUVEAU_GETPARAM_CHIPSET_ID :
@@ -188,13 +189,13 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)break ;case NOUVEAU_GETPARAM_PCI_VENDOR :if (device->info.platform !=NV_DEVICE_INFO_V0_SOC ) - getparam->value = dev->pdev->vendor; + getparam->value = pdev->vendor;else getparam->value =0 ;break ;case NOUVEAU_GETPARAM_PCI_DEVICE :if (device->info.platform !=NV_DEVICE_INFO_V0_SOC ) - getparam->value = dev->pdev->device; + getparam->value = pdev->device;else getparam->value =0 ;break ;
@@ -205,7 +206,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)case NV_DEVICE_INFO_V0_PCIE : getparam->value =2 ;break ;case NV_DEVICE_INFO_V0_SOC : getparam->value =3 ;break ;case NV_DEVICE_INFO_V0_IGP : -if (!pci_is_pcie (dev->pdev)) +if (!pci_is_pcie (pdev)) getparam->value =1 ;else getparam->value =2 ;
drivers/gpu/drm/nouveau/nouveau_acpi.c +1 -1
@@ -377,7 +377,7 @@ nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector)return NULL ; } - handle =ACPI_HANDLE (&dev->pdev->dev); + handle =ACPI_HANDLE (dev->dev);if (!handle)return NULL ;
drivers/gpu/drm/nouveau/nouveau_bios.c +8 -3
@@ -110,6 +110,9 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outpstruct nvbios *bios = &drm->vbios;uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->or &DCB_OUTPUT_C ?1 :0 );uint16_t scriptofs =ROM16 (bios->data[bios->init_script_tbls_ptr + sub *2 ]); +#ifdef __powerpc__ +struct pci_dev *pdev =to_pci_dev (dev->dev); +#endif if (!bios->fp.xlated_entry || !sub || !scriptofs)return -EINVAL ;
@@ -123,8 +126,8 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp#ifdef __powerpc__/* Powerbook specific quirks */ if (script ==LVDS_RESET && - (dev->pdev->device ==0x0179 || dev->pdev->device ==0x0189 || - dev->pdev->device ==0x0329 )) + (pdev->device ==0x0179 || pdev->device ==0x0189 || + pdev->device ==0x0329 ))nv_write_tmds (dev, dcbent->or,0 ,0x02 ,0x72 );#endif
@@ -2080,11 +2083,13 @@ nouveau_bios_init(struct drm_device *dev) {struct nouveau_drm *drm =nouveau_drm (dev);struct nvbios *bios = &drm->vbios; +struct pci_dev *pdev;int ret;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return 0 ; + pdev =to_pci_dev (dev->dev);if (!NVInitVBIOS (dev))return -ENODEV ;
drivers/gpu/drm/nouveau/nouveau_connector.c +6 -4
@@ -411,6 +411,7 @@ static struct nouveau_encoder * nouveau_connector_ddc_detect(struct drm_connector *connector) {struct drm_device *dev = connector->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct nouveau_encoder *nv_encoder =NULL , *found =NULL ;struct drm_encoder *encoder;int ret;
@@ -438,11 +439,11 @@ nouveau_connector_ddc_detect(struct drm_connector *connector)break ;if (switcheroo_ddc) -vga_switcheroo_lock_ddc (dev->pdev); +vga_switcheroo_lock_ddc (pdev);if (nvkm_probe_i2c (nv_encoder->i2c,0x50 )) found = nv_encoder;if (switcheroo_ddc) -vga_switcheroo_unlock_ddc (dev->pdev); +vga_switcheroo_unlock_ddc (pdev);break ; }
@@ -490,6 +491,7 @@ nouveau_connector_set_encoder(struct drm_connector *connector,struct nouveau_connector *nv_connector =nouveau_connector (connector);struct nouveau_drm *drm =nouveau_drm (connector->dev);struct drm_device *dev = connector->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);if (nv_connector->detected_encoder == nv_encoder)return ;
@@ -511,8 +513,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector, connector->doublescan_allowed = true;if (drm->client.device.info.family ==NV_DEVICE_INFO_V0_KELVIN || (drm->client.device.info.family ==NV_DEVICE_INFO_V0_CELSIUS && - (dev->pdev->device &0x0ff0 ) !=0x0100 && - (dev->pdev->device &0x0ff0 ) !=0x0150 )) + (pdev->device &0x0ff0 ) !=0x0100 && + (pdev->device &0x0ff0 ) !=0x0150 ))/* HW is broken */ connector->interlace_allowed = false;else
drivers/gpu/drm/nouveau/nouveau_drm.c +2 -3
@@ -115,8 +115,8 @@ nouveau_platform_name(struct platform_device *platformdev)static u64 nouveau_name (struct drm_device *dev) { -if (dev->pdev) -return nouveau_pci_name (dev->pdev); +if (dev_is_pci (dev->dev)) +return nouveau_pci_name (to_pci_dev (dev->dev));else return nouveau_platform_name (to_platform_device (dev->dev)); }
@@ -760,7 +760,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev,if (ret) goto fail_drm; - drm_dev->pdev = pdev;pci_set_drvdata (pdev, drm_dev); ret =nouveau_drm_device_init (drm_dev);
drivers/gpu/drm/nouveau/nouveau_fbcon.c +4 -2
@@ -396,7 +396,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,NV_INFO (drm,"allocated %dx%d fb: 0x%llx, bo %p\n" , fb->width, fb->height, nvbo->offset, nvbo); -vga_switcheroo_client_fb_set (dev->pdev, info); +if (dev_is_pci (dev->dev)) +vga_switcheroo_client_fb_set (to_pci_dev (dev->dev), info); +return 0 ; out_unlock:
@@ -548,7 +550,7 @@ nouveau_fbcon_init(struct drm_device *dev)int ret;if (!dev->mode_config.num_crtc || - (dev->pdev->class >>8 ) !=PCI_CLASS_DISPLAY_VGA ) + (to_pci_dev (dev->dev)->class >>8 ) !=PCI_CLASS_DISPLAY_VGA )return 0 ; fbcon =kzalloc (sizeof (struct nouveau_fbdev ),GFP_KERNEL );
drivers/gpu/drm/nouveau/nouveau_vga.c +12 -8
@@ -87,18 +87,20 @@ nouveau_vga_init(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev, dev,NULL , nouveau_vga_set_decode); +vga_client_register (pdev, dev,NULL , nouveau_vga_set_decode);/* don't register Thunderbolt eGPU with vga_switcheroo */ -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_register_client (dev->pdev, &nouveau_switcheroo_ops, runtime); +vga_switcheroo_register_client (pdev, &nouveau_switcheroo_ops, runtime);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_init_domain_pm_ops (drm->dev->dev, &drm->vga_pm_domain);
@@ -109,17 +111,19 @@ nouveau_vga_fini(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (pdev,NULL ,NULL ,NULL ); -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_unregister_client (dev->pdev); +vga_switcheroo_unregister_client (pdev);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_fini_domain_pm_ops (drm->dev->dev); }
Signature · 1 line
2.29.2
Re: [PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
Hi Thomas.
Quoted 5 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert nouveau to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Ben Skeggs <[email protected]>
Suggestion to an alternative implmentation below.
Quoted 19 lines
--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 12 +++++++----- drivers/gpu/drm/nouveau/dispnv04/disp.h | 14 ++++++++------ drivers/gpu/drm/nouveau/dispnv04/hw.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_abi16.c | 7 ++++--- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 11 ++++++++--- drivers/gpu/drm/nouveau/nouveau_connector.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 6 ++++-- drivers/gpu/drm/nouveau/nouveau_vga.c | 20 ++++++++++++-------- 10 files changed, 58 insertions(+), 39 deletions(-)drivers/gpu/drm/nouveau/nouveau_bios.c +0
-0
drivers/gpu/drm/nouveau/nouveau_bios.c static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp · line 115
Quoted 6 lines
drivers/gpu/drm/nouveau/nouveau_bios.c +3
-0@@ -110,6 +110,9 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outpstruct nvbios *bios = &drm->vbios;uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->or &DCB_OUTPUT_C ?1 :0 );uint16_t scriptofs =ROM16 (bios->data[bios->init_script_tbls_ptr + sub *2 ]); +#ifdef __powerpc__ +struct pci_dev *pdev =to_pci_dev (dev->dev); +#endif
Or
int device = 0;
drivers/gpu/drm/nouveau/nouveau_bios.c static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp · line 127
Quoted 6 lines
drivers/gpu/drm/nouveau/nouveau_bios.c +0
-0if (!bios->fp.xlated_entry || !sub || !scriptofs)return -EINVAL ;@@ -123,8 +126,8 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp#ifdef __powerpc__/* Powerbook specific quirks */
device = to_pci_dev(dev->dev)->device; if (script == LVDS_RESET && (device == 0x0179 || device == 0x0189 || device == 0x0329))
Quoted 15 lines
drivers/gpu/drm/nouveau/nouveau_bios.c +2
-2if (script ==LVDS_RESET && - (dev->pdev->device ==0x0179 || dev->pdev->device ==0x0189 || - dev->pdev->device ==0x0329 )) + (pdev->device ==0x0179 || pdev->device ==0x0189 || + pdev->device ==0x0329 ))nv_write_tmds (dev, dcbent->or,0 ,0x02 ,0x72 );#endif drivers/gpu/drm/nouveau/nouveau_fbcon.c +0
-0
drivers/gpu/drm/nouveau/nouveau_fbcon.c nouveau_fbcon_create(struct drm_fb_helper *helper, · line 401
Quoted 7 lines
drivers/gpu/drm/nouveau/nouveau_fbcon.c +3
-1@@ -396,7 +396,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,NV_INFO (drm,"allocated %dx%d fb: 0x%llx, bo %p\n" , fb->width, fb->height, nvbo->offset, nvbo); -vga_switcheroo_client_fb_set (dev->pdev, info); +if (dev_is_pci (dev->dev)) +vga_switcheroo_client_fb_set (to_pci_dev (dev->dev), info); +
I cannot see why dev_is_pci() is needed here.
So I am obviously missing something :-(
Quoted 72 lines
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1
-1return 0 ; out_unlock:@@ -548,7 +550,7 @@ nouveau_fbcon_init(struct drm_device *dev)int ret;if (!dev->mode_config.num_crtc || - (dev->pdev->class >>8 ) !=PCI_CLASS_DISPLAY_VGA ) + (to_pci_dev (dev->dev)->class >>8 ) !=PCI_CLASS_DISPLAY_VGA )return 0 ; fbcon =kzalloc (sizeof (struct nouveau_fbdev ),GFP_KERNEL );drivers/gpu/drm/nouveau/nouveau_vga.c +12
-8@@ -87,18 +87,20 @@ nouveau_vga_init(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev, dev,NULL , nouveau_vga_set_decode); +vga_client_register (pdev, dev,NULL , nouveau_vga_set_decode);/* don't register Thunderbolt eGPU with vga_switcheroo */ -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_register_client (dev->pdev, &nouveau_switcheroo_ops, runtime); +vga_switcheroo_register_client (pdev, &nouveau_switcheroo_ops, runtime);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_init_domain_pm_ops (drm->dev->dev, &drm->vga_pm_domain);@@ -109,17 +111,19 @@ nouveau_vga_fini(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (pdev,NULL ,NULL ,NULL ); -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_unregister_client (dev->pdev); +vga_switcheroo_unregister_client (pdev);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_fini_domain_pm_ops (drm->dev->dev); }Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerRe: [PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev
Hi Sam
Am 24.11.20 um 22:42 schrieb Sam Ravnborg:
Quoted 39 lines
Hi Thomas.
Quoted 5 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert nouveau to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Ben Skeggs <[email protected]>Suggestion to an alternative implmentation below.
Quoted 19 lines
--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 12 +++++++----- drivers/gpu/drm/nouveau/dispnv04/disp.h | 14 ++++++++------ drivers/gpu/drm/nouveau/dispnv04/hw.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_abi16.c | 7 ++++--- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 11 ++++++++--- drivers/gpu/drm/nouveau/nouveau_connector.c | 10 ++++++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ++--- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 6 ++++-- drivers/gpu/drm/nouveau/nouveau_vga.c | 20 ++++++++++++-------- 10 files changed, 58 insertions(+), 39 deletions(-)drivers/gpu/drm/nouveau/nouveau_bios.c +0
-0drivers/gpu/drm/nouveau/nouveau_bios.c static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp · line 115
Quoted 6 lines
drivers/gpu/drm/nouveau/nouveau_bios.c +3
-0@@ -110,6 +110,9 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outpstruct nvbios *bios = &drm->vbios;uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->or &DCB_OUTPUT_C ?1 :0 );uint16_t scriptofs =ROM16 (bios->data[bios->init_script_tbls_ptr + sub *2 ]); +#ifdef __powerpc__ +struct pci_dev *pdev =to_pci_dev (dev->dev); +#endif Or
int device = 0;Quoted 1 line
Quoted 7 lines
drivers/gpu/drm/nouveau/nouveau_bios.c static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp · line 127
Quoted 5 lines
if (!bios->fp.xlated_entry || !sub || !scriptofs) return -EINVAL;drivers/gpu/drm/nouveau/nouveau_bios.c +0
-0@@ -123,8 +126,8 @@ static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_outp#ifdef __powerpc__/* Powerbook specific quirks */ device = to_pci_dev(dev->dev)->device; if (script == LVDS_RESET && (device == 0x0179 || device == 0x0189 || device == 0x0329))
I see the point, but I'm trying to not change the existing implementation too much.
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/nouveau/nouveau_bios.c +2
-2if (script ==LVDS_RESET && - (dev->pdev->device ==0x0179 || dev->pdev->device ==0x0189 || - dev->pdev->device ==0x0329 )) + (pdev->device ==0x0179 || pdev->device ==0x0189 || + pdev->device ==0x0329 ))nv_write_tmds (dev, dcbent->or,0 ,0x02 ,0x72 );#endif drivers/gpu/drm/nouveau/nouveau_fbcon.c +0
-0@@ -396,7 +396,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,NV_INFO (drm,"allocated %dx%d fb: 0x%llx, bo %p\n" , fb->width, fb->height, nvbo->offset, nvbo);
Quoted 6 lines
drivers/gpu/drm/nouveau/nouveau_fbcon.c nouveau_fbcon_create(struct drm_fb_helper *helper, · line 401
Quoted 4 lines
drivers/gpu/drm/nouveau/nouveau_fbcon.c +3
-1-vga_switcheroo_client_fb_set (dev->pdev, info); +if (dev_is_pci (dev->dev)) +vga_switcheroo_client_fb_set (to_pci_dev (dev->dev), info); +I cannot see why
dev_is_pci()is needed here.
So I am obviously missing something :-(
vga_switcheroo_client_fb_set() expects a PCI device. It's a bit of a stretch, but at least it is possible to pass NULL for non-PCI devices. Passing the upcasted dev->dev is just garbage.
As the VGA switcheroo is only relevant for PCI devices, I added the branching to make this work reliably.
Best regards
Thomas
Quoted 73 lines
Quoted 73 lines
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1
-1return 0 ; out_unlock:@@ -548,7 +550,7 @@ nouveau_fbcon_init(struct drm_device *dev)int ret;if (!dev->mode_config.num_crtc || - (dev->pdev->class >>8 ) !=PCI_CLASS_DISPLAY_VGA ) + (to_pci_dev (dev->dev)->class >>8 ) !=PCI_CLASS_DISPLAY_VGA )return 0 ; fbcon =kzalloc (sizeof (struct nouveau_fbdev ),GFP_KERNEL );drivers/gpu/drm/nouveau/nouveau_vga.c +12
-8@@ -87,18 +87,20 @@ nouveau_vga_init(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev, dev,NULL , nouveau_vga_set_decode); +vga_client_register (pdev, dev,NULL , nouveau_vga_set_decode);/* don't register Thunderbolt eGPU with vga_switcheroo */ -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_register_client (dev->pdev, &nouveau_switcheroo_ops, runtime); +vga_switcheroo_register_client (pdev, &nouveau_switcheroo_ops, runtime);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_init_domain_pm_ops (drm->dev->dev, &drm->vga_pm_domain);@@ -109,17 +111,19 @@ nouveau_vga_fini(struct nouveau_drm *drm) {struct drm_device *dev = drm->dev;bool runtime =nouveau_pmops_runtime (); +struct pci_dev *pdev;/* only relevant for PCI devices */ -if (!dev->pdev) +if (!dev_is_pci (dev->dev))return ; + pdev =to_pci_dev (dev->dev); -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (pdev,NULL ,NULL ,NULL ); -if (pci_is_thunderbolt_attached (dev->pdev)) +if (pci_is_thunderbolt_attached (pdev))return ; -vga_switcheroo_unregister_client (dev->pdev); +vga_switcheroo_unregister_client (pdev);if (runtime &&nouveau_is_v1_dsm () && !nouveau_is_optimus ())vga_switcheroo_fini_domain_pm_ops (drm->dev->dev); }Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Thomas Zimmermann
maintainerPATCH 10/15 drm/qxl: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert qxl to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/qxl/qxl_drv.c | 2 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 3 ++- drivers/gpu/drm/qxl/qxl_irq.c | 3 ++- drivers/gpu/drm/qxl/qxl_kms.c | 1 - 4 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/qxl/qxl_drv.c +1 -1
@@ -163,7 +163,7 @@ DEFINE_DRM_GEM_FOPS(qxl_fops);static int qxl_drm_freeze (struct drm_device *dev) { -struct pci_dev *pdev = dev->pdev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct qxl_device *qdev =to_qxl (dev);int ret;
drivers/gpu/drm/qxl/qxl_ioctl.c +2 -1
@@ -370,13 +370,14 @@ static int qxl_clientcap_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) {struct qxl_device *qdev =to_qxl (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_qxl_clientcap *param = data;int byte, idx; byte = param->index /8 ; idx = param->index %8 ; -if (dev->pdev->revision <4 ) +if (pdev->revision <4 )return -ENOSYS ;if (byte >=58 )
drivers/gpu/drm/qxl/qxl_irq.c +2 -1
@@ -81,6 +81,7 @@ static void qxl_client_monitors_config_work_func(struct work_struct *work)int qxl_irq_init (struct qxl_device *qdev) { +struct pci_dev *pdev =to_pci_dev (qdev->ddev.dev);int ret;init_waitqueue_head (&qdev->display_event);
@@ -93,7 +94,7 @@ int qxl_irq_init(struct qxl_device *qdev)atomic_set (&qdev->irq_received_cursor,0 );atomic_set (&qdev->irq_received_io_cmd,0 ); qdev->irq_received_error =0 ; - ret =drm_irq_install (&qdev->ddev, qdev->ddev.pdev->irq); + ret =drm_irq_install (&qdev->ddev, pdev->irq); qdev->ram_header->int_mask =QXL_INTERRUPT_MASK ;if (unlikely (ret !=0 )) {DRM_ERROR ("Failed installing irq: %d\n" , ret);
drivers/gpu/drm/qxl/qxl_kms.c +0 -1
@@ -111,7 +111,6 @@ int qxl_device_init(struct qxl_device *qdev, {int r, sb; - qdev->ddev.pdev = pdev;pci_set_drvdata (pdev, &qdev->ddev);mutex_init (&qdev->gem.mutex);
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 11/15 drm/radeon: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert radeon to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/radeon/atombios_encoders.c | 6 +- drivers/gpu/drm/radeon/r100.c | 27 +++--- drivers/gpu/drm/radeon/radeon.h | 32 +++---- drivers/gpu/drm/radeon/radeon_atombios.c | 89 ++++++++++--------- drivers/gpu/drm/radeon/radeon_bios.c | 6 +- drivers/gpu/drm/radeon/radeon_combios.c | 55 ++++++------ drivers/gpu/drm/radeon/radeon_cs.c | 3 +- drivers/gpu/drm/radeon/radeon_device.c | 17 ++-- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 3 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 6 +- drivers/gpu/drm/radeon/radeon_i2c.c | 2 +- drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 20 ++--- .../gpu/drm/radeon/radeon_legacy_encoders.c | 6 +- drivers/gpu/drm/radeon/rs780_dpm.c | 7 +- 17 files changed, 144 insertions(+), 141 deletions(-)
drivers/gpu/drm/radeon/atombios_encoders.c +3 -3
@@ -2065,9 +2065,9 @@ atombios_apply_encoder_quirks(struct drm_encoder *encoder,struct radeon_crtc *radeon_crtc =to_radeon_crtc (encoder->crtc);/* Funky macbooks */ -if ((dev->pdev->device ==0x71C5 ) && - (dev->pdev->subsystem_vendor ==0x106b ) && - (dev->pdev->subsystem_device ==0x0080 )) { +if ((rdev->pdev->device ==0x71C5 ) && + (rdev->pdev->subsystem_vendor ==0x106b ) && + (rdev->pdev->subsystem_device ==0x0080 )) {if (radeon_encoder->devices &ATOM_DEVICE_LCD1_SUPPORT ) {uint32_t lvtma_bit_depth_control =RREG32 (AVIVO_LVTMA_BIT_DEPTH_CONTROL );
drivers/gpu/drm/radeon/r100.c +13 -14
@@ -2611,7 +2611,6 @@ int r100_asic_reset(struct radeon_device *rdev, bool hard)void r100_set_common_regs (struct radeon_device *rdev) { -struct drm_device *dev = rdev->ddev;bool force_dac2 = false;u32 tmp;
@@ -2629,7 +2628,7 @@ void r100_set_common_regs(struct radeon_device *rdev)* don't report it in the bios connector * table. */ -switch (dev->pdev->device) { +switch (rdev->pdev->device) {/* RN50 */ case 0x515e :case 0x5969 :
@@ -2639,17 +2638,17 @@ void r100_set_common_regs(struct radeon_device *rdev)case 0x5159 :case 0x515a :/* DELL triple head servers */ -if ((dev->pdev->subsystem_vendor ==0x1028 /* DELL */ ) && - ((dev->pdev->subsystem_device ==0x016c ) || - (dev->pdev->subsystem_device ==0x016d ) || - (dev->pdev->subsystem_device ==0x016e ) || - (dev->pdev->subsystem_device ==0x016f ) || - (dev->pdev->subsystem_device ==0x0170 ) || - (dev->pdev->subsystem_device ==0x017d ) || - (dev->pdev->subsystem_device ==0x017e ) || - (dev->pdev->subsystem_device ==0x0183 ) || - (dev->pdev->subsystem_device ==0x018a ) || - (dev->pdev->subsystem_device ==0x019a ))) +if ((rdev->pdev->subsystem_vendor ==0x1028 /* DELL */ ) && + ((rdev->pdev->subsystem_device ==0x016c ) || + (rdev->pdev->subsystem_device ==0x016d ) || + (rdev->pdev->subsystem_device ==0x016e ) || + (rdev->pdev->subsystem_device ==0x016f ) || + (rdev->pdev->subsystem_device ==0x0170 ) || + (rdev->pdev->subsystem_device ==0x017d ) || + (rdev->pdev->subsystem_device ==0x017e ) || + (rdev->pdev->subsystem_device ==0x0183 ) || + (rdev->pdev->subsystem_device ==0x018a ) || + (rdev->pdev->subsystem_device ==0x019a ))) force_dac2 = true;break ; }
@@ -2797,7 +2796,7 @@ void r100_vram_init_sizes(struct radeon_device *rdev) rdev->mc.real_vram_size =8192 *1024 ;WREG32 (RADEON_CONFIG_MEMSIZE , rdev->mc.real_vram_size); } -/* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM - +/* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM - * Novell bug 204882 + along with lots of ubuntu ones */ if (rdev->mc.aper_size > config_aper_size)
drivers/gpu/drm/radeon/radeon.h +16 -16
@@ -2623,14 +2623,14 @@ void r100_pll_errata_after_index(struct radeon_device *rdev); (rdev->family == CHIP_RV410) || \ (rdev->family == CHIP_RS400) || \ (rdev->family == CHIP_RS480)) -#define ASIC_IS_X2 (rdev) ((rdev->ddev->pdev->device == 0x9441) || \ - (rdev->ddev->pdev->device == 0x9443) || \ - (rdev->ddev->pdev->device == 0x944B) || \ - (rdev->ddev->pdev->device == 0x9506) || \ - (rdev->ddev->pdev->device == 0x9509) || \ - (rdev->ddev->pdev->device == 0x950F) || \ - (rdev->ddev->pdev->device == 0x689C) || \ - (rdev->ddev->pdev->device == 0x689D)) +#define ASIC_IS_X2 (rdev) ((rdev->pdev->device == 0x9441) || \ + (rdev->pdev->device == 0x9443) || \ + (rdev->pdev->device == 0x944B) || \ + (rdev->pdev->device == 0x9506) || \ + (rdev->pdev->device == 0x9509) || \ + (rdev->pdev->device == 0x950F) || \ + (rdev->pdev->device == 0x689C) || \ + (rdev->pdev->device == 0x689D))#define ASIC_IS_AVIVO (rdev) ((rdev->family >= CHIP_RS600))#define ASIC_IS_DCE2 (rdev) ((rdev->family == CHIP_RS600) || \ (rdev->family == CHIP_RS690) || \
@@ -2653,14 +2653,14 @@ void r100_pll_errata_after_index(struct radeon_device *rdev);#define ASIC_IS_DCE83 (rdev) ((rdev->family == CHIP_KABINI) || \ (rdev->family == CHIP_MULLINS)) -#define ASIC_IS_LOMBOK (rdev) ((rdev->ddev->pdev->device == 0x6849) || \ - (rdev->ddev->pdev->device == 0x6850) || \ - (rdev->ddev->pdev->device == 0x6858) || \ - (rdev->ddev->pdev->device == 0x6859) || \ - (rdev->ddev->pdev->device == 0x6840) || \ - (rdev->ddev->pdev->device == 0x6841) || \ - (rdev->ddev->pdev->device == 0x6842) || \ - (rdev->ddev->pdev->device == 0x6843)) +#define ASIC_IS_LOMBOK (rdev) ((rdev->pdev->device == 0x6849) || \ + (rdev->pdev->device == 0x6850) || \ + (rdev->pdev->device == 0x6858) || \ + (rdev->pdev->device == 0x6859) || \ + (rdev->pdev->device == 0x6840) || \ + (rdev->pdev->device == 0x6841) || \ + (rdev->pdev->device == 0x6842) || \ + (rdev->pdev->device == 0x6843))/* * BIOS helpers.
drivers/gpu/drm/radeon/radeon_atombios.c +45 -44
173 lines not on this page · raw message
drivers/gpu/drm/radeon/radeon_bios.c +3 -3
@@ -528,7 +528,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev) crtc_ext_cntl =RREG32 (RADEON_CRTC_EXT_CNTL ); fp2_gen_cntl =0 ; -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { fp2_gen_cntl =RREG32 (RADEON_FP2_GEN_CNTL ); }
@@ -565,7 +565,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev) (RADEON_CRTC_SYNC_TRISTAT | RADEON_CRTC_DISPLAY_DIS))); -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) {WREG32 (RADEON_FP2_GEN_CNTL , (fp2_gen_cntl & ~RADEON_FP2_ON )); }
@@ -583,7 +583,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev)WREG32 (RADEON_CRTC2_GEN_CNTL , crtc2_gen_cntl); }WREG32 (RADEON_CRTC_EXT_CNTL , crtc_ext_cntl); -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) {WREG32 (RADEON_FP2_GEN_CNTL , fp2_gen_cntl); }return r;
drivers/gpu/drm/radeon/radeon_combios.c +29 -26
102 lines not on this page · raw message
drivers/gpu/drm/radeon/radeon_cs.c +1 -2
@@ -130,8 +130,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)* IGP chips to avoid image corruptions */ if (p->ring ==R600_RING_TYPE_UVD_INDEX && - (i <=0 ||pci_find_capability (p->rdev->ddev->pdev, -PCI_CAP_ID_AGP ) || + (i <=0 ||pci_find_capability (p->rdev->pdev,PCI_CAP_ID_AGP ) || p->rdev->family ==CHIP_RS780 || p->rdev->family ==CHIP_RS880 )) {
drivers/gpu/drm/radeon/radeon_device.c +10 -7
@@ -1564,6 +1564,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon, bool freeze) {struct radeon_device *rdev; +struct pci_dev *pdev;struct drm_crtc *crtc;struct drm_connector *connector;int i, r;
@@ -1573,6 +1574,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, } rdev = dev->dev_private; + pdev =to_pci_dev (dev->dev);if (dev->switch_power_state ==DRM_SWITCH_POWER_OFF )return 0 ;
@@ -1638,14 +1640,14 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,radeon_agp_suspend (rdev); -pci_save_state (dev->pdev); +pci_save_state (pdev);if (freeze && rdev->family >=CHIP_CEDAR && !(rdev->flags &RADEON_IS_IGP )) { rdev->asic->asic_reset (rdev, true); -pci_restore_state (dev->pdev); +pci_restore_state (pdev); }else if (suspend) {/* Shut down the device */ -pci_disable_device (dev->pdev); -pci_set_power_state (dev->pdev, PCI_D3hot); +pci_disable_device (pdev); +pci_set_power_state (pdev, PCI_D3hot); }if (fbcon) {
@@ -1669,6 +1671,7 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon) {struct drm_connector *connector;struct radeon_device *rdev = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_crtc *crtc;int r;
@@ -1679,9 +1682,9 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon)console_lock (); }if (resume) { -pci_set_power_state (dev->pdev,PCI_D0 ); -pci_restore_state (dev->pdev); -if (pci_enable_device (dev->pdev)) { +pci_set_power_state (pdev,PCI_D0 ); +pci_restore_state (pdev); +if (pci_enable_device (pdev)) {if (fbcon)console_unlock ();return -1 ;
drivers/gpu/drm/radeon/radeon_display.c +1 -1
@@ -1321,7 +1321,7 @@ radeon_user_framebuffer_create(struct drm_device *dev, obj =drm_gem_object_lookup (file_priv, mode_cmd->handles[0 ]);if (obj ==NULL ) { -dev_err (&dev->pdev->dev,"No GEM object associated to handle 0x%08X, " +dev_err (dev->dev,"No GEM object associated to handle 0x%08X, " "can't create framebuffer\n" , mode_cmd->handles[0 ]);return ERR_PTR (-ENOENT ); }
drivers/gpu/drm/radeon/radeon_drv.c +1 -2
@@ -354,14 +354,13 @@ static int radeon_pci_probe(struct pci_dev *pdev,if (ret) goto err_free; - dev->pdev = pdev;#ifdef __alpha__ dev->hose = pdev->sysdata;#endif pci_set_drvdata (pdev, dev); -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) +if (pci_find_capability (pdev,PCI_CAP_ID_AGP )) dev->agp =drm_agp_init (dev);if (dev->agp) { dev->agp->agp_mtrr = arch_phys_wc_add(
drivers/gpu/drm/radeon/radeon_fb.c +1 -1
@@ -290,7 +290,7 @@ static int radeonfb_create(struct drm_fb_helper *helper,DRM_INFO ("fb depth is %d\n" , fb->format->depth);DRM_INFO (" pitch is %d\n" , fb->pitches[0 ]); -vga_switcheroo_client_fb_set (rdev->ddev->pdev, info); +vga_switcheroo_client_fb_set (rdev->pdev, info);return 0 ; out:
drivers/gpu/drm/radeon/radeon_gem.c +3 -3
@@ -650,7 +650,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, }if (args->offset <RADEON_VA_RESERVED_SIZE ) { -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"offset 0x%lX is in reserved area 0x%X\n" , (unsigned long )args->offset,RADEON_VA_RESERVED_SIZE );
@@ -664,7 +664,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data,*/ invalid_flags =RADEON_VM_PAGE_VALID |RADEON_VM_PAGE_SYSTEM ;if ((args->flags & invalid_flags)) { -dev_err (&dev->pdev->dev,"invalid flags 0x%08X vs 0x%08X\n" , +dev_err (dev->dev,"invalid flags 0x%08X vs 0x%08X\n" , args->flags, invalid_flags); args->operation =RADEON_VA_RESULT_ERROR ;return -EINVAL ;
@@ -675,7 +675,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data,case RADEON_VA_UNMAP :break ;default : -dev_err (&dev->pdev->dev,"unsupported operation %d\n" , +dev_err (dev->dev,"unsupported operation %d\n" , args->operation); args->operation =RADEON_VA_RESULT_ERROR ;return -EINVAL ;
drivers/gpu/drm/radeon/radeon_i2c.c +1 -1
@@ -927,7 +927,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, i2c->rec = *rec; i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c);mutex_init (&i2c->mutex);
drivers/gpu/drm/radeon/radeon_irq_kms.c +1 -1
@@ -315,7 +315,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)INIT_WORK (&rdev->audio_work, r600_audio_update_hdmi); rdev->irq.installed = true; - r =drm_irq_install (rdev->ddev, rdev->ddev->pdev->irq); + r =drm_irq_install (rdev->ddev, rdev->pdev->irq);if (r) { rdev->irq.installed = false;flush_delayed_work (&rdev->hotplug_work);
drivers/gpu/drm/radeon/radeon_kms.c +10 -10
@@ -74,7 +74,7 @@ void radeon_driver_unload_kms(struct drm_device *dev) }radeon_acpi_fini (rdev); - +radeon_modeset_fini (rdev);radeon_device_fini (rdev);
@@ -103,6 +103,7 @@ void radeon_driver_unload_kms(struct drm_device *dev)*/ int radeon_driver_load_kms (struct drm_device *dev,unsigned long flags) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct radeon_device *rdev;int r, acpi_status;
@@ -113,9 +114,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) dev->dev_private = (void *)rdev;/* update BUS flag */ -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) { +if (pci_find_capability (pdev,PCI_CAP_ID_AGP )) { flags |=RADEON_IS_AGP ; - }else if (pci_is_pcie (dev->pdev)) { + }else if (pci_is_pcie (pdev)) { flags |=RADEON_IS_PCIE ; }else { flags |=RADEON_IS_PCI ;
@@ -124,7 +125,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)if ((radeon_runtime_pm !=0 ) &&radeon_has_atpx () && ((flags &RADEON_IS_IGP ) ==0 ) && - !pci_is_thunderbolt_attached (dev->pdev)) + !pci_is_thunderbolt_attached (pdev)) flags |=RADEON_IS_PX ;/* radeon_device_init should report only fatal error
@@ -133,9 +134,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)* properly initialize the GPU MC controller and permit * VRAM allocation */ - r =radeon_device_init (rdev, dev, dev->pdev, flags); + r =radeon_device_init (rdev, dev, pdev, flags);if (r) { -dev_err (&dev->pdev->dev,"Fatal error during GPU init\n" ); +dev_err (dev->dev,"Fatal error during GPU init\n" ); goto out; }
@@ -145,7 +146,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)*/ r =radeon_modeset_init (rdev);if (r) -dev_err (&dev->pdev->dev,"Fatal error during modeset init\n" ); +dev_err (dev->dev,"Fatal error during modeset init\n" );/* Call ACPI methods: require modeset init * but failure is not fatal
@@ -153,8 +154,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)if (!r) { acpi_status =radeon_acpi_init (rdev);if (acpi_status) -dev_dbg (&dev->pdev->dev, -"Error during ACPI methods call\n" ); +dev_dbg (dev->dev,"Error during ACPI methods call\n" ); }if (radeon_is_px (dev)) {
@@ -237,7 +237,7 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)switch (info->request) {case RADEON_INFO_DEVICE_ID : - *value = dev->pdev->device; + *value =to_pci_dev (dev->dev)->device;break ;case RADEON_INFO_NUM_GB_PIPES : *value = rdev->num_gb_pipes;
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +3 -3
@@ -973,9 +973,9 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,/* XXX: these are oem specific */ if (ASIC_IS_R300 (rdev)) { -if ((dev->pdev->device ==0x4850 ) && - (dev->pdev->subsystem_vendor ==0x1028 ) && - (dev->pdev->subsystem_device ==0x2001 ))/* Dell Inspiron 8600 */ +if ((rdev->pdev->device ==0x4850 ) && + (rdev->pdev->subsystem_vendor ==0x1028 ) && + (rdev->pdev->subsystem_device ==0x2001 ))/* Dell Inspiron 8600 */ fp2_gen_cntl |=R300_FP2_DVO_CLOCK_MODE_SINGLE ;else fp2_gen_cntl |=RADEON_FP2_PAD_FLOP_EN |R300_FP2_DVO_CLOCK_MODE_SINGLE ;
drivers/gpu/drm/radeon/rs780_dpm.c +3 -4
@@ -223,16 +223,15 @@ static void rs780_preset_starting_fbdiv(struct radeon_device *rdev)static void rs780_voltage_scaling_init (struct radeon_device *rdev) {struct igp_power_info *pi =rs780_get_pi (rdev); -struct drm_device *dev = rdev->ddev;u32 fv_throt_pwm_fb_div_range[3 ];u32 fv_throt_pwm_range[4 ]; -if (dev->pdev->device ==0x9614 ) { +if (rdev->pdev->device ==0x9614 ) { fv_throt_pwm_fb_div_range[0 ] =RS780D_FVTHROTPWMFBDIVRANGEREG0_DFLT ; fv_throt_pwm_fb_div_range[1 ] =RS780D_FVTHROTPWMFBDIVRANGEREG1_DFLT ; fv_throt_pwm_fb_div_range[2 ] =RS780D_FVTHROTPWMFBDIVRANGEREG2_DFLT ; - }else if ((dev->pdev->device ==0x9714 ) || - (dev->pdev->device ==0x9715 )) { + }else if ((rdev->pdev->device ==0x9714 ) || + (rdev->pdev->device ==0x9715 )) { fv_throt_pwm_fb_div_range[0 ] =RS880D_FVTHROTPWMFBDIVRANGEREG0_DFLT ; fv_throt_pwm_fb_div_range[1 ] =RS880D_FVTHROTPWMFBDIVRANGEREG1_DFLT ; fv_throt_pwm_fb_div_range[2 ] =RS880D_FVTHROTPWMFBDIVRANGEREG2_DFLT ;
Signature · 6 lines
2.29.2 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 11/15] drm/radeon: Remove references to struct drm_device.pdev
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert radeon to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>
There are a few unrelated whitespace changes. Other than that, patch is:
Quoted 774 lines
--- drivers/gpu/drm/radeon/atombios_encoders.c | 6 +- drivers/gpu/drm/radeon/r100.c | 27 +++--- drivers/gpu/drm/radeon/radeon.h | 32 +++---- drivers/gpu/drm/radeon/radeon_atombios.c | 89 ++++++++++--------- drivers/gpu/drm/radeon/radeon_bios.c | 6 +- drivers/gpu/drm/radeon/radeon_combios.c | 55 ++++++------ drivers/gpu/drm/radeon/radeon_cs.c | 3 +- drivers/gpu/drm/radeon/radeon_device.c | 17 ++-- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/radeon/radeon_drv.c | 3 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 6 +- drivers/gpu/drm/radeon/radeon_i2c.c | 2 +- drivers/gpu/drm/radeon/radeon_irq_kms.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 20 ++--- .../gpu/drm/radeon/radeon_legacy_encoders.c | 6 +- drivers/gpu/drm/radeon/rs780_dpm.c | 7 +- 17 files changed, 144 insertions(+), 141 deletions(-)drivers/gpu/drm/radeon/atombios_encoders.c +3
-3@@ -2065,9 +2065,9 @@ atombios_apply_encoder_quirks(struct drm_encoder *encoder,struct radeon_crtc *radeon_crtc =to_radeon_crtc (encoder->crtc);/* Funky macbooks */ -if ((dev->pdev->device ==0x71C5 ) && - (dev->pdev->subsystem_vendor ==0x106b ) && - (dev->pdev->subsystem_device ==0x0080 )) { +if ((rdev->pdev->device ==0x71C5 ) && + (rdev->pdev->subsystem_vendor ==0x106b ) && + (rdev->pdev->subsystem_device ==0x0080 )) {if (radeon_encoder->devices &ATOM_DEVICE_LCD1_SUPPORT ) {uint32_t lvtma_bit_depth_control =RREG32 (AVIVO_LVTMA_BIT_DEPTH_CONTROL );drivers/gpu/drm/radeon/r100.c +13
-14@@ -2611,7 +2611,6 @@ int r100_asic_reset(struct radeon_device *rdev, bool hard)void r100_set_common_regs (struct radeon_device *rdev) { -struct drm_device *dev = rdev->ddev;bool force_dac2 = false;u32 tmp;@@ -2629,7 +2628,7 @@ void r100_set_common_regs(struct radeon_device *rdev)* don't report it in the bios connector * table. */ -switch (dev->pdev->device) { +switch (rdev->pdev->device) {/* RN50 */ case 0x515e :case 0x5969 :@@ -2639,17 +2638,17 @@ void r100_set_common_regs(struct radeon_device *rdev)case 0x5159 :case 0x515a :/* DELL triple head servers */ -if ((dev->pdev->subsystem_vendor ==0x1028 /* DELL */ ) && - ((dev->pdev->subsystem_device ==0x016c ) || - (dev->pdev->subsystem_device ==0x016d ) || - (dev->pdev->subsystem_device ==0x016e ) || - (dev->pdev->subsystem_device ==0x016f ) || - (dev->pdev->subsystem_device ==0x0170 ) || - (dev->pdev->subsystem_device ==0x017d ) || - (dev->pdev->subsystem_device ==0x017e ) || - (dev->pdev->subsystem_device ==0x0183 ) || - (dev->pdev->subsystem_device ==0x018a ) || - (dev->pdev->subsystem_device ==0x019a ))) +if ((rdev->pdev->subsystem_vendor ==0x1028 /* DELL */ ) && + ((rdev->pdev->subsystem_device ==0x016c ) || + (rdev->pdev->subsystem_device ==0x016d ) || + (rdev->pdev->subsystem_device ==0x016e ) || + (rdev->pdev->subsystem_device ==0x016f ) || + (rdev->pdev->subsystem_device ==0x0170 ) || + (rdev->pdev->subsystem_device ==0x017d ) || + (rdev->pdev->subsystem_device ==0x017e ) || + (rdev->pdev->subsystem_device ==0x0183 ) || + (rdev->pdev->subsystem_device ==0x018a ) || + (rdev->pdev->subsystem_device ==0x019a ))) force_dac2 = true;break ; }@@ -2797,7 +2796,7 @@ void r100_vram_init_sizes(struct radeon_device *rdev) rdev->mc.real_vram_size =8192 *1024 ;WREG32 (RADEON_CONFIG_MEMSIZE , rdev->mc.real_vram_size); } -/* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM - +/* Fix for RN50, M6, M7 with 8/16/32(??) MBs of VRAM - * Novell bug 204882 + along with lots of ubuntu ones */ if (rdev->mc.aper_size > config_aper_size)drivers/gpu/drm/radeon/radeon.h +16
-16@@ -2623,14 +2623,14 @@ void r100_pll_errata_after_index(struct radeon_device *rdev); (rdev->family == CHIP_RV410) || \ (rdev->family == CHIP_RS400) || \ (rdev->family == CHIP_RS480)) -#define ASIC_IS_X2 (rdev) ((rdev->ddev->pdev->device == 0x9441) || \ - (rdev->ddev->pdev->device == 0x9443) || \ - (rdev->ddev->pdev->device == 0x944B) || \ - (rdev->ddev->pdev->device == 0x9506) || \ - (rdev->ddev->pdev->device == 0x9509) || \ - (rdev->ddev->pdev->device == 0x950F) || \ - (rdev->ddev->pdev->device == 0x689C) || \ - (rdev->ddev->pdev->device == 0x689D)) +#define ASIC_IS_X2 (rdev) ((rdev->pdev->device == 0x9441) || \ + (rdev->pdev->device == 0x9443) || \ + (rdev->pdev->device == 0x944B) || \ + (rdev->pdev->device == 0x9506) || \ + (rdev->pdev->device == 0x9509) || \ + (rdev->pdev->device == 0x950F) || \ + (rdev->pdev->device == 0x689C) || \ + (rdev->pdev->device == 0x689D))#define ASIC_IS_AVIVO (rdev) ((rdev->family >= CHIP_RS600))#define ASIC_IS_DCE2 (rdev) ((rdev->family == CHIP_RS600) || \ (rdev->family == CHIP_RS690) || \@@ -2653,14 +2653,14 @@ void r100_pll_errata_after_index(struct radeon_device *rdev);#define ASIC_IS_DCE83 (rdev) ((rdev->family == CHIP_KABINI) || \ (rdev->family == CHIP_MULLINS)) -#define ASIC_IS_LOMBOK (rdev) ((rdev->ddev->pdev->device == 0x6849) || \ - (rdev->ddev->pdev->device == 0x6850) || \ - (rdev->ddev->pdev->device == 0x6858) || \ - (rdev->ddev->pdev->device == 0x6859) || \ - (rdev->ddev->pdev->device == 0x6840) || \ - (rdev->ddev->pdev->device == 0x6841) || \ - (rdev->ddev->pdev->device == 0x6842) || \ - (rdev->ddev->pdev->device == 0x6843)) +#define ASIC_IS_LOMBOK (rdev) ((rdev->pdev->device == 0x6849) || \ + (rdev->pdev->device == 0x6850) || \ + (rdev->pdev->device == 0x6858) || \ + (rdev->pdev->device == 0x6859) || \ + (rdev->pdev->device == 0x6840) || \ + (rdev->pdev->device == 0x6841) || \ + (rdev->pdev->device == 0x6842) || \ + (rdev->pdev->device == 0x6843))/* * BIOS helpers. drivers/gpu/drm/radeon/radeon_atombios.c +45
-44@@ -291,46 +291,47 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,uint16_t *line_mux, struct radeon_hpd *hpd) { + struct pci_dev *pdev = to_pci_dev(dev->dev);/* Asus M2A-VM HDMI board lists the DVI port as HDMI */ -if ((dev->pdev->device ==0x791e ) && - (dev->pdev->subsystem_vendor ==0x1043 ) && - (dev->pdev->subsystem_device ==0x826d )) { +if ((pdev->device ==0x791e ) && + (pdev->subsystem_vendor ==0x1043 ) && + (pdev->subsystem_device ==0x826d )) {if ((*connector_type ==DRM_MODE_CONNECTOR_HDMIA ) && (supported_device ==ATOM_DEVICE_DFP3_SUPPORT )) *connector_type =DRM_MODE_CONNECTOR_DVID ; }/* Asrock RS600 board lists the DVI port as HDMI */ -if ((dev->pdev->device ==0x7941 ) && - (dev->pdev->subsystem_vendor ==0x1849 ) && - (dev->pdev->subsystem_device ==0x7941 )) { +if ((pdev->device ==0x7941 ) && + (pdev->subsystem_vendor ==0x1849 ) && + (pdev->subsystem_device ==0x7941 )) {if ((*connector_type ==DRM_MODE_CONNECTOR_HDMIA ) && (supported_device ==ATOM_DEVICE_DFP3_SUPPORT )) *connector_type =DRM_MODE_CONNECTOR_DVID ; }/* MSI K9A2GM V2/V3 board has no HDMI or DVI */ -if ((dev->pdev->device ==0x796e ) && - (dev->pdev->subsystem_vendor ==0x1462 ) && - (dev->pdev->subsystem_device ==0x7302 )) { +if ((pdev->device ==0x796e ) && + (pdev->subsystem_vendor ==0x1462 ) && + (pdev->subsystem_device ==0x7302 )) {if ((supported_device ==ATOM_DEVICE_DFP2_SUPPORT ) || (supported_device ==ATOM_DEVICE_DFP3_SUPPORT ))return false; }/* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */ -if ((dev->pdev->device ==0x7941 ) && - (dev->pdev->subsystem_vendor ==0x147b ) && - (dev->pdev->subsystem_device ==0x2412 )) { +if ((pdev->device ==0x7941 ) && + (pdev->subsystem_vendor ==0x147b ) && + (pdev->subsystem_device ==0x2412 )) {if (*connector_type ==DRM_MODE_CONNECTOR_DVII )return false; }/* Falcon NW laptop lists vga ddc line for LVDS */ -if ((dev->pdev->device ==0x5653 ) && - (dev->pdev->subsystem_vendor ==0x1462 ) && - (dev->pdev->subsystem_device ==0x0291 )) { +if ((pdev->device ==0x5653 ) && + (pdev->subsystem_vendor ==0x1462 ) && + (pdev->subsystem_device ==0x0291 )) {if (*connector_type ==DRM_MODE_CONNECTOR_LVDS ) { i2c_bus->valid = false; *line_mux =53 ;@@ -338,26 +339,26 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, }/* HIS X1300 is DVI+VGA, not DVI+DVI */ -if ((dev->pdev->device ==0x7146 ) && - (dev->pdev->subsystem_vendor ==0x17af ) && - (dev->pdev->subsystem_device ==0x2058 )) { +if ((pdev->device ==0x7146 ) && + (pdev->subsystem_vendor ==0x17af ) && + (pdev->subsystem_device ==0x2058 )) {if (supported_device ==ATOM_DEVICE_DFP1_SUPPORT )return false; }/* Gigabyte X1300 is DVI+VGA, not DVI+DVI */ -if ((dev->pdev->device ==0x7142 ) && - (dev->pdev->subsystem_vendor ==0x1458 ) && - (dev->pdev->subsystem_device ==0x2134 )) { +if ((pdev->device ==0x7142 ) && + (pdev->subsystem_vendor ==0x1458 ) && + (pdev->subsystem_device ==0x2134 )) {if (supported_device ==ATOM_DEVICE_DFP1_SUPPORT )return false; }/* Funky macbooks */ -if ((dev->pdev->device ==0x71C5 ) && - (dev->pdev->subsystem_vendor ==0x106b ) && - (dev->pdev->subsystem_device ==0x0080 )) { +if ((pdev->device ==0x71C5 ) && + (pdev->subsystem_vendor ==0x106b ) && + (pdev->subsystem_device ==0x0080 )) {if ((supported_device ==ATOM_DEVICE_CRT1_SUPPORT ) || (supported_device ==ATOM_DEVICE_DFP2_SUPPORT ))return false;@@ -373,27 +374,27 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, }/* ASUS HD 3600 XT board lists the DVI port as HDMI */ -if ((dev->pdev->device ==0x9598 ) && - (dev->pdev->subsystem_vendor ==0x1043 ) && - (dev->pdev->subsystem_device ==0x01da )) { +if ((pdev->device ==0x9598 ) && + (pdev->subsystem_vendor ==0x1043 ) && + (pdev->subsystem_device ==0x01da )) {if (*connector_type ==DRM_MODE_CONNECTOR_HDMIA ) { *connector_type =DRM_MODE_CONNECTOR_DVII ; } }/* ASUS HD 3600 board lists the DVI port as HDMI */ -if ((dev->pdev->device ==0x9598 ) && - (dev->pdev->subsystem_vendor ==0x1043 ) && - (dev->pdev->subsystem_device ==0x01e4 )) { +if ((pdev->device ==0x9598 ) && + (pdev->subsystem_vendor ==0x1043 ) && + (pdev->subsystem_device ==0x01e4 )) {if (*connector_type ==DRM_MODE_CONNECTOR_HDMIA ) { *connector_type =DRM_MODE_CONNECTOR_DVII ; } }/* ASUS HD 3450 board lists the DVI port as HDMI */ -if ((dev->pdev->device ==0x95C5 ) && - (dev->pdev->subsystem_vendor ==0x1043 ) && - (dev->pdev->subsystem_device ==0x01e2 )) { +if ((pdev->device ==0x95C5 ) && + (pdev->subsystem_vendor ==0x1043 ) && + (pdev->subsystem_device ==0x01e2 )) {if (*connector_type ==DRM_MODE_CONNECTOR_HDMIA ) { *connector_type =DRM_MODE_CONNECTOR_DVII ; }@@ -418,9 +419,9 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,* with different crtcs which isn't possible on the hardware * side and leaves no crtcs for LVDS or VGA. */ -if (((dev->pdev->device ==0x95c4 ) || (dev->pdev->device ==0x9591 )) && - (dev->pdev->subsystem_vendor ==0x1025 ) && - (dev->pdev->subsystem_device ==0x013c )) { +if (((pdev->device ==0x95c4 ) || (pdev->device ==0x9591 )) && + (pdev->subsystem_vendor ==0x1025 ) && + (pdev->subsystem_device ==0x013c )) {if ((*connector_type ==DRM_MODE_CONNECTOR_DVII ) && (supported_device ==ATOM_DEVICE_DFP1_SUPPORT )) {/* actually it's a DVI-D port not DVI-I */ @@ -432,9 +433,9 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,/* XFX Pine Group device rv730 reports no VGA DDC lines * even though they are wired up to record 0x93 */ -if ((dev->pdev->device ==0x9498 ) && - (dev->pdev->subsystem_vendor ==0x1682 ) && - (dev->pdev->subsystem_device ==0x2452 ) && +if ((pdev->device ==0x9498 ) && + (pdev->subsystem_vendor ==0x1682 ) && + (pdev->subsystem_device ==0x2452 ) && (i2c_bus->valid == false) && !(supported_device & (ATOM_DEVICE_TV_SUPPORT |ATOM_DEVICE_CV_SUPPORT ))) {struct radeon_device *rdev = dev->dev_private;@@ -442,11 +443,11 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, }/* Fujitsu D3003-S2 board lists DVI-I as DVI-D and VGA */ -if (((dev->pdev->device ==0x9802 ) || - (dev->pdev->device ==0x9805 ) || - (dev->pdev->device ==0x9806 )) && - (dev->pdev->subsystem_vendor ==0x1734 ) && - (dev->pdev->subsystem_device ==0x11bd )) { +if (((pdev->device ==0x9802 ) || + (pdev->device ==0x9805 ) || + (pdev->device ==0x9806 )) && + (pdev->subsystem_vendor ==0x1734 ) && + (pdev->subsystem_device ==0x11bd )) {if (*connector_type ==DRM_MODE_CONNECTOR_VGA ) { *connector_type =DRM_MODE_CONNECTOR_DVII ; *line_mux =0x3103 ;drivers/gpu/drm/radeon/radeon_bios.c +3
-3@@ -528,7 +528,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev) crtc_ext_cntl =RREG32 (RADEON_CRTC_EXT_CNTL ); fp2_gen_cntl =0 ; -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { fp2_gen_cntl =RREG32 (RADEON_FP2_GEN_CNTL ); }@@ -565,7 +565,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev) (RADEON_CRTC_SYNC_TRISTAT | RADEON_CRTC_DISPLAY_DIS))); -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) {WREG32 (RADEON_FP2_GEN_CNTL , (fp2_gen_cntl & ~RADEON_FP2_ON )); }@@ -583,7 +583,7 @@ static bool legacy_read_disabled_bios(struct radeon_device *rdev)WREG32 (RADEON_CRTC2_GEN_CNTL , crtc2_gen_cntl); }WREG32 (RADEON_CRTC_EXT_CNTL , crtc_ext_cntl); -if (rdev->ddev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) { +if (rdev->pdev->device ==PCI_DEVICE_ID_ATI_RADEON_QY ) {WREG32 (RADEON_FP2_GEN_CNTL , fp2_gen_cntl); }return r;drivers/gpu/drm/radeon/radeon_combios.c +29
-26@@ -898,13 +898,13 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct/* quirks */ /* Radeon 7000 (RV100) */ -if (((dev->pdev->device ==0x5159 ) && - (dev->pdev->subsystem_vendor ==0x174B ) && - (dev->pdev->subsystem_device ==0x7c28 )) || +if (((rdev->pdev->device ==0x5159 ) && + (rdev->pdev->subsystem_vendor ==0x174B ) && + (rdev->pdev->subsystem_device ==0x7c28 )) ||/* Radeon 9100 (R200) */ - ((dev->pdev->device ==0x514D ) && - (dev->pdev->subsystem_vendor ==0x174B ) && - (dev->pdev->subsystem_device ==0x7149 ))) { + ((rdev->pdev->device ==0x514D ) && + (rdev->pdev->subsystem_vendor ==0x174B ) && + (rdev->pdev->subsystem_device ==0x7149 ))) {/* vbios value is bad, use the default */ found =0 ; }@@ -2225,20 +2225,21 @@ static bool radeon_apply_legacy_quirks(struct drm_device *dev,struct radeon_i2c_bus_rec *ddc_i2c, struct radeon_hpd *hpd) { + struct radeon_device *rdev = dev->dev_private;/* Certain IBM chipset RN50s have a BIOS reporting two VGAs, one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ -if (dev->pdev->device ==0x515e && - dev->pdev->subsystem_vendor ==0x1014 ) { +if (rdev->pdev->device ==0x515e && + rdev->pdev->subsystem_vendor ==0x1014 ) {if (*legacy_connector ==CONNECTOR_CRT_LEGACY && ddc_i2c->mask_clk_reg ==RADEON_GPIO_CRT2_DDC )return false; }/* X300 card with extra non-existent DVI port */ -if (dev->pdev->device ==0x5B60 && - dev->pdev->subsystem_vendor ==0x17af && - dev->pdev->subsystem_device ==0x201e && bios_index ==2 ) { +if (rdev->pdev->device ==0x5B60 && + rdev->pdev->subsystem_vendor ==0x17af && + rdev->pdev->subsystem_device ==0x201e && bios_index ==2 ) {if (*legacy_connector ==CONNECTOR_DVI_I_LEGACY )return false; }@@ -2248,22 +2249,24 @@ static bool radeon_apply_legacy_quirks(struct drm_device *dev,static bool radeon_apply_legacy_tv_quirks (struct drm_device *dev) { +struct radeon_device *rdev = dev->dev_private; +/* Acer 5102 has non-existent TV port */ -if (dev->pdev->device ==0x5975 && - dev->pdev->subsystem_vendor ==0x1025 && - dev->pdev->subsystem_device ==0x009f ) +if (rdev->pdev->device ==0x5975 && + rdev->pdev->subsystem_vendor ==0x1025 && + rdev->pdev->subsystem_device ==0x009f )return false;/* HP dc5750 has non-existent TV port */ -if (dev->pdev->device ==0x5974 && - dev->pdev->subsystem_vendor ==0x103c && - dev->pdev->subsystem_device ==0x280a ) +if (rdev->pdev->device ==0x5974 && + rdev->pdev->subsystem_vendor ==0x103c && + rdev->pdev->subsystem_device ==0x280a )return false;/* MSI S270 has non-existent TV port */ -if (dev->pdev->device ==0x5955 && - dev->pdev->subsystem_vendor ==0x1462 && - dev->pdev->subsystem_device ==0x0131 ) +if (rdev->pdev->device ==0x5955 && + rdev->pdev->subsystem_vendor ==0x1462 && + rdev->pdev->subsystem_device ==0x0131 )return false;return true;@@ -2417,9 +2420,9 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)/* RV100 board with external TDMS bit mis-set. * Actually uses internal TMDS, clear the bit. */ -if (dev->pdev->device ==0x5159 && - dev->pdev->subsystem_vendor ==0x1014 && - dev->pdev->subsystem_device ==0x029A ) { +if (rdev->pdev->device ==0x5159 && + rdev->pdev->subsystem_vendor ==0x1014 && + rdev->pdev->subsystem_device ==0x029A ) { tmp &= ~(1 <<4 ); }if ((tmp >>4 ) &0x1 ) {@@ -2711,9 +2714,9 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)/* boards with a thermal chip, but no overdrive table */ /* Asus 9600xt has an f75375 on the monid bus */ -if ((dev->pdev->device ==0x4152 ) && - (dev->pdev->subsystem_vendor ==0x1043 ) && - (dev->pdev->subsystem_device ==0xc002 )) { +if ((rdev->pdev->device ==0x4152 ) && + (rdev->pdev->subsystem_vendor ==0x1043 ) && + (rdev->pdev->subsystem_device ==0xc002 )) { i2c_bus =combios_setup_i2c_bus (rdev,DDC_MONID ,0 ,0 ); rdev->pm.i2c_bus =radeon_i2c_lookup (rdev, &i2c_bus);if (rdev->pm.i2c_bus) {drivers/gpu/drm/radeon/radeon_cs.c +1
-2@@ -130,8 +130,7 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)* IGP chips to avoid image corruptions */ if (p->ring ==R600_RING_TYPE_UVD_INDEX && - (i <=0 ||pci_find_capability (p->rdev->ddev->pdev, -PCI_CAP_ID_AGP ) || + (i <=0 ||pci_find_capability (p->rdev->pdev,PCI_CAP_ID_AGP ) || p->rdev->family ==CHIP_RS780 || p->rdev->family ==CHIP_RS880 )) {drivers/gpu/drm/radeon/radeon_device.c +10
-7@@ -1564,6 +1564,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon, bool freeze) {struct radeon_device *rdev; +struct pci_dev *pdev;struct drm_crtc *crtc;struct drm_connector *connector;int i, r;@@ -1573,6 +1574,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, } rdev = dev->dev_private; + pdev =to_pci_dev (dev->dev);if (dev->switch_power_state ==DRM_SWITCH_POWER_OFF )return 0 ;@@ -1638,14 +1640,14 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,radeon_agp_suspend (rdev); -pci_save_state (dev->pdev); +pci_save_state (pdev);if (freeze && rdev->family >=CHIP_CEDAR && !(rdev->flags &RADEON_IS_IGP )) { rdev->asic->asic_reset (rdev, true); -pci_restore_state (dev->pdev); +pci_restore_state (pdev); }else if (suspend) {/* Shut down the device */ -pci_disable_device (dev->pdev); -pci_set_power_state (dev->pdev, PCI_D3hot); +pci_disable_device (pdev); +pci_set_power_state (pdev, PCI_D3hot); }if (fbcon) {@@ -1669,6 +1671,7 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon) {struct drm_connector *connector;struct radeon_device *rdev = dev->dev_private; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_crtc *crtc;int r;@@ -1679,9 +1682,9 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon)console_lock (); }if (resume) { -pci_set_power_state (dev->pdev,PCI_D0 ); -pci_restore_state (dev->pdev); -if (pci_enable_device (dev->pdev)) { +pci_set_power_state (pdev,PCI_D0 ); +pci_restore_state (pdev); +if (pci_enable_device (pdev)) {if (fbcon)console_unlock ();return -1 ;drivers/gpu/drm/radeon/radeon_display.c +1
-1@@ -1321,7 +1321,7 @@ radeon_user_framebuffer_create(struct drm_device *dev, obj =drm_gem_object_lookup (file_priv, mode_cmd->handles[0 ]);if (obj ==NULL ) { -dev_err (&dev->pdev->dev,"No GEM object associated to handle 0x%08X, " +dev_err (dev->dev,"No GEM object associated to handle 0x%08X, " "can't create framebuffer\n" , mode_cmd->handles[0 ]);return ERR_PTR (-ENOENT ); }drivers/gpu/drm/radeon/radeon_drv.c +1
-2@@ -354,14 +354,13 @@ static int radeon_pci_probe(struct pci_dev *pdev,if (ret) goto err_free; - dev->pdev = pdev;#ifdef __alpha__ dev->hose = pdev->sysdata;#endif pci_set_drvdata (pdev, dev); -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) +if (pci_find_capability (pdev,PCI_CAP_ID_AGP )) dev->agp =drm_agp_init (dev);if (dev->agp) { dev->agp->agp_mtrr = arch_phys_wc_add(drivers/gpu/drm/radeon/radeon_fb.c +1
-1@@ -290,7 +290,7 @@ static int radeonfb_create(struct drm_fb_helper *helper,DRM_INFO ("fb depth is %d\n" , fb->format->depth);DRM_INFO (" pitch is %d\n" , fb->pitches[0 ]); -vga_switcheroo_client_fb_set (rdev->ddev->pdev, info); +vga_switcheroo_client_fb_set (rdev->pdev, info);return 0 ; out:drivers/gpu/drm/radeon/radeon_gem.c +3
-3@@ -650,7 +650,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data, }if (args->offset <RADEON_VA_RESERVED_SIZE ) { -dev_err (&dev->pdev->dev, +dev_err (dev->dev,"offset 0x%lX is in reserved area 0x%X\n" , (unsigned long )args->offset,RADEON_VA_RESERVED_SIZE );@@ -664,7 +664,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data,*/ invalid_flags =RADEON_VM_PAGE_VALID |RADEON_VM_PAGE_SYSTEM ;if ((args->flags & invalid_flags)) { -dev_err (&dev->pdev->dev,"invalid flags 0x%08X vs 0x%08X\n" , +dev_err (dev->dev,"invalid flags 0x%08X vs 0x%08X\n" , args->flags, invalid_flags); args->operation =RADEON_VA_RESULT_ERROR ;return -EINVAL ;@@ -675,7 +675,7 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data,case RADEON_VA_UNMAP :break ;default : -dev_err (&dev->pdev->dev,"unsupported operation %d\n" , +dev_err (dev->dev,"unsupported operation %d\n" , args->operation); args->operation =RADEON_VA_RESULT_ERROR ;return -EINVAL ;drivers/gpu/drm/radeon/radeon_i2c.c +1
-1@@ -927,7 +927,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, i2c->rec = *rec; i2c->adapter.owner =THIS_MODULE ; i2c->adapter.class =I2C_CLASS_DDC ; - i2c->adapter.dev.parent = &dev->pdev->dev; + i2c->adapter.dev.parent = dev->dev; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c);mutex_init (&i2c->mutex);drivers/gpu/drm/radeon/radeon_irq_kms.c +1
-1@@ -315,7 +315,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)INIT_WORK (&rdev->audio_work, r600_audio_update_hdmi); rdev->irq.installed = true; - r =drm_irq_install (rdev->ddev, rdev->ddev->pdev->irq); + r =drm_irq_install (rdev->ddev, rdev->pdev->irq);if (r) { rdev->irq.installed = false;flush_delayed_work (&rdev->hotplug_work);drivers/gpu/drm/radeon/radeon_kms.c +10
-10@@ -74,7 +74,7 @@ void radeon_driver_unload_kms(struct drm_device *dev) }radeon_acpi_fini (rdev); - +radeon_modeset_fini (rdev);radeon_device_fini (rdev);@@ -103,6 +103,7 @@ void radeon_driver_unload_kms(struct drm_device *dev)*/ int radeon_driver_load_kms (struct drm_device *dev,unsigned long flags) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct radeon_device *rdev;int r, acpi_status;@@ -113,9 +114,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) dev->dev_private = (void *)rdev;/* update BUS flag */ -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) { +if (pci_find_capability (pdev,PCI_CAP_ID_AGP )) { flags |=RADEON_IS_AGP ; - }else if (pci_is_pcie (dev->pdev)) { + }else if (pci_is_pcie (pdev)) { flags |=RADEON_IS_PCIE ; }else { flags |=RADEON_IS_PCI ;@@ -124,7 +125,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)if ((radeon_runtime_pm !=0 ) &&radeon_has_atpx () && ((flags &RADEON_IS_IGP ) ==0 ) && - !pci_is_thunderbolt_attached (dev->pdev)) + !pci_is_thunderbolt_attached (pdev)) flags |=RADEON_IS_PX ;/* radeon_device_init should report only fatal error @@ -133,9 +134,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)* properly initialize the GPU MC controller and permit * VRAM allocation */ - r =radeon_device_init (rdev, dev, dev->pdev, flags); + r =radeon_device_init (rdev, dev, pdev, flags);if (r) { -dev_err (&dev->pdev->dev,"Fatal error during GPU init\n" ); +dev_err (dev->dev,"Fatal error during GPU init\n" ); goto out; }@@ -145,7 +146,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)*/ r =radeon_modeset_init (rdev);if (r) -dev_err (&dev->pdev->dev,"Fatal error during modeset init\n" ); +dev_err (dev->dev,"Fatal error during modeset init\n" );/* Call ACPI methods: require modeset init * but failure is not fatal @@ -153,8 +154,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)if (!r) { acpi_status =radeon_acpi_init (rdev);if (acpi_status) -dev_dbg (&dev->pdev->dev, -"Error during ACPI methods call\n" ); +dev_dbg (dev->dev,"Error during ACPI methods call\n" ); }if (radeon_is_px (dev)) {@@ -237,7 +237,7 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)switch (info->request) {case RADEON_INFO_DEVICE_ID : - *value = dev->pdev->device; + *value =to_pci_dev (dev->dev)->device;break ;case RADEON_INFO_NUM_GB_PIPES : *value = rdev->num_gb_pipes;drivers/gpu/drm/radeon/radeon_legacy_encoders.c +3
-3@@ -973,9 +973,9 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,/* XXX: these are oem specific */ if (ASIC_IS_R300 (rdev)) { -if ((dev->pdev->device ==0x4850 ) && - (dev->pdev->subsystem_vendor ==0x1028 ) && - (dev->pdev->subsystem_device ==0x2001 ))/* Dell Inspiron 8600 */ +if ((rdev->pdev->device ==0x4850 ) && + (rdev->pdev->subsystem_vendor ==0x1028 ) && + (rdev->pdev->subsystem_device ==0x2001 ))/* Dell Inspiron 8600 */ fp2_gen_cntl |=R300_FP2_DVO_CLOCK_MODE_SINGLE ;else fp2_gen_cntl |=RADEON_FP2_PAD_FLOP_EN |R300_FP2_DVO_CLOCK_MODE_SINGLE ;drivers/gpu/drm/radeon/rs780_dpm.c +3
-5@@ -223,16 +223,15 @@ static void rs780_preset_starting_fbdiv(struct radeon_device *rdev)static void rs780_voltage_scaling_init (struct radeon_device *rdev) {struct igp_power_info *pi =rs780_get_pi (rdev); -struct drm_device *dev = rdev->ddev;u32 fv_throt_pwm_fb_div_range[3 ];u32 fv_throt_pwm_range[4 ]; -if (dev->pdev->device ==0x9614 ) { +if (rdev->pdev->device ==0x9614 ) { fv_throt_pwm_fb_div_range[0 ] =RS780D_FVTHROTPWMFBDIVRANGEREG0_DFLT ; fv_throt_pwm_fb_div_range[1 ] =RS780D_FVTHROTPWMFBDIVRANGEREG1_DFLT ; fv_throt_pwm_fb_div_range[2 ] =RS780D_FVTHROTPWMFBDIVRANGEREG2_DFLT ; - }else if ((dev->pdev->device ==0x9714 ) || - (dev->pdev->device ==0x9715 )) { + }else if ((rdev->pdev->device ==0x9714 ) || + (rdev->pdev->device ==0x9715 )) { fv_throt_pwm_fb_div_range[0 ] =RS880D_FVTHROTPWMFBDIVRANGEREG0_DFLT ; fv_throt_pwm_fb_div_range[1 ] =RS880D_FVTHROTPWMFBDIVRANGEREG1_DFLT ; fv_throt_pwm_fb_div_range[2 ] =RS880D_FVTHROTPWMFBDIVRANGEREG2_DFLT ; --2.29.2
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Thomas Zimmermann
maintainerPATCH 12/15 drm/vboxvideo: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert vboxvideo to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/vboxvideo/vbox_drv.c | 11 ++++++----- drivers/gpu/drm/vboxvideo/vbox_irq.c | 4 +++- drivers/gpu/drm/vboxvideo/vbox_main.c | 8 ++++++-- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 7 ++++--- 4 files changed, 19 insertions(+), 11 deletions(-)
drivers/gpu/drm/vboxvideo/vbox_drv.c +6 -5
@@ -51,7 +51,6 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (IS_ERR (vbox))return PTR_ERR (vbox); - vbox->ddev.pdev = pdev;pci_set_drvdata (pdev, vbox);mutex_init (&vbox->hw_mutex);
@@ -109,15 +108,16 @@ static void vbox_pci_remove(struct pci_dev *pdev)static int vbox_pm_suspend (struct device *dev) {struct vbox_private *vbox =dev_get_drvdata (dev); +struct pci_dev *pdev =to_pci_dev (dev);int error; error =drm_mode_config_helper_suspend (&vbox->ddev);if (error)return error; -pci_save_state (vbox->ddev.pdev); -pci_disable_device (vbox->ddev.pdev); -pci_set_power_state (vbox->ddev.pdev, PCI_D3hot); +pci_save_state (pdev); +pci_disable_device (pdev); +pci_set_power_state (pdev, PCI_D3hot);return 0 ; }
@@ -125,8 +125,9 @@ static int vbox_pm_suspend(struct device *dev)static int vbox_pm_resume (struct device *dev) {struct vbox_private *vbox =dev_get_drvdata (dev); +struct pci_dev *pdev =to_pci_dev (dev); -if (pci_enable_device (vbox->ddev.pdev)) +if (pci_enable_device (pdev))return -EIO ;return drm_mode_config_helper_resume (&vbox->ddev);
drivers/gpu/drm/vboxvideo/vbox_irq.c +3 -1
@@ -170,10 +170,12 @@ static void vbox_hotplug_worker(struct work_struct *work)int vbox_irq_init (struct vbox_private *vbox) { +struct pci_dev *pdev =to_pci_dev (vbox->ddev.dev); +INIT_WORK (&vbox->hotplug_work, vbox_hotplug_worker);vbox_update_mode_hints (vbox); -return drm_irq_install (&vbox->ddev, vbox->ddev.pdev->irq); +return drm_irq_install (&vbox->ddev, pdev->irq); }void vbox_irq_fini (struct vbox_private *vbox)
drivers/gpu/drm/vboxvideo/vbox_main.c +6 -2
@@ -8,7 +8,9 @@* Hans de Goede <[email protected]> */ +#include <linux/pci.h> #include <linux/vbox_err.h> +#include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_damage_helper.h>
@@ -30,6 +32,7 @@ void vbox_report_caps(struct vbox_private *vbox)static int vbox_accel_init (struct vbox_private *vbox) { +struct pci_dev *pdev =to_pci_dev (vbox->ddev.dev);struct vbva_buffer *vbva;unsigned int i;
@@ -41,7 +44,7 @@ static int vbox_accel_init(struct vbox_private *vbox)/* Take a command buffer for each screen from the end of usable VRAM. */ vbox->available_vram_size -= vbox->num_crtcs *VBVA_MIN_BUFFER_SIZE ; - vbox->vbva_buffers =pci_iomap_range (vbox->ddev.pdev,0 , + vbox->vbva_buffers =pci_iomap_range (pdev,0 , vbox->available_vram_size, vbox->num_crtcs *VBVA_MIN_BUFFER_SIZE );
@@ -106,6 +109,7 @@ bool vbox_check_supported(u16 id)int vbox_hw_init (struct vbox_private *vbox) { +struct pci_dev *pdev =to_pci_dev (vbox->ddev.dev);int ret = -ENOMEM ; vbox->full_vram_size =inl (VBE_DISPI_IOPORT_DATA );
@@ -115,7 +119,7 @@ int vbox_hw_init(struct vbox_private *vbox)/* Map guest-heap at end of vram */ vbox->guest_heap = -pci_iomap_range (vbox->ddev.pdev,0 ,GUEST_HEAP_OFFSET (vbox), +pci_iomap_range (pdev,0 ,GUEST_HEAP_OFFSET (vbox),GUEST_HEAP_SIZE );if (!vbox->guest_heap)return -ENOMEM ;
drivers/gpu/drm/vboxvideo/vbox_ttm.c +4 -3
@@ -15,8 +15,9 @@ int vbox_mm_init(struct vbox_private *vbox)struct drm_vram_mm *vmm;int ret;struct drm_device *dev = &vbox->ddev; +struct pci_dev *pdev =to_pci_dev (dev->dev); - vmm =drm_vram_helper_alloc_mm (dev,pci_resource_start (dev->pdev,0 ), + vmm =drm_vram_helper_alloc_mm (dev,pci_resource_start (pdev,0 ), vbox->available_vram_size);if (IS_ERR (vmm)) { ret =PTR_ERR (vmm);
@@ -24,8 +25,8 @@ int vbox_mm_init(struct vbox_private *vbox)return ret; } - vbox->fb_mtrr =arch_phys_wc_add (pci_resource_start (dev->pdev,0 ), -pci_resource_len (dev->pdev,0 )); + vbox->fb_mtrr =arch_phys_wc_add (pci_resource_start (pdev,0 ), +pci_resource_len (pdev,0 ));return 0 ; }
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 13/15 drm/virtgpu: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert virtgpu to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_drv.c +0 -1
@@ -54,7 +54,6 @@ static int virtio_gpu_pci_quirk(struct drm_device *dev, struct virtio_device *vdDRM_INFO ("pci: %s detected at %s\n" , vga ?"virtio-vga" :"virtio-gpu-pci" , pname); - dev->pdev = pdev;if (vga)drm_fb_helper_remove_conflicting_pci_framebuffers (pdev,"virtiodrmfb" );
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH 14/15 drm/vmwgfx: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- 3 files changed, 19 insertions(+), 18 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +4 -4
@@ -1230,7 +1230,7 @@ int vmw_cmdbuf_set_pool_size(struct vmw_cmdbuf_man *man,/* First, try to allocate a huge chunk of DMA memory */ size =PAGE_ALIGN (size); - man->map =dma_alloc_coherent (&dev_priv->dev->pdev->dev, size, + man->map =dma_alloc_coherent (dev_priv->dev->dev, size, &man->handle,GFP_KERNEL );if (man->map) { man->using_mob = false;
@@ -1313,7 +1313,7 @@ struct vmw_cmdbuf_man *vmw_cmdbuf_man_create(struct vmw_private *dev_priv) man->num_contexts = (dev_priv->capabilities &SVGA_CAP_HP_CMD_QUEUE ) ?2 :1 ; man->headers =dma_pool_create ("vmwgfx cmdbuf" , - &dev_priv->dev->pdev->dev, + dev_priv->dev->dev,sizeof (SVGACBHeader),64 ,PAGE_SIZE );if (!man->headers) {
@@ -1322,7 +1322,7 @@ struct vmw_cmdbuf_man *vmw_cmdbuf_man_create(struct vmw_private *dev_priv) } man->dheaders =dma_pool_create ("vmwgfx inline cmdbuf" , - &dev_priv->dev->pdev->dev, + dev_priv->dev->dev,sizeof (struct vmw_cmdbuf_dheader ),64 ,PAGE_SIZE );if (!man->dheaders) {
@@ -1387,7 +1387,7 @@ void vmw_cmdbuf_remove_pool(struct vmw_cmdbuf_man *man)ttm_bo_put (man->cmd_space); man->cmd_space =NULL ; }else { -dma_free_coherent (&man->dev_priv->dev->pdev->dev, +dma_free_coherent (man->dev_priv->dev->dev, man->size, man->map, man->handle); } }
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +14 -13
@@ -652,6 +652,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)enum vmw_res_type i;bool refuse_dma = false;char host_log[100 ] = {0 }; +struct pci_dev *pdev =to_pci_dev (dev->dev); dev_priv =kzalloc (sizeof (*dev_priv),GFP_KERNEL );if (unlikely (!dev_priv)) {
@@ -659,7 +660,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)return -ENOMEM ; } -pci_set_master (dev->pdev); +pci_set_master (pdev); dev_priv->dev = dev; dev_priv->vmw_chipset = chipset;
@@ -688,9 +689,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) dev_priv->used_memory_size =0 ; - dev_priv->io_start =pci_resource_start (dev->pdev,0 ); - dev_priv->vram_start =pci_resource_start (dev->pdev,1 ); - dev_priv->mmio_start =pci_resource_start (dev->pdev,2 ); + dev_priv->io_start =pci_resource_start (pdev,0 ); + dev_priv->vram_start =pci_resource_start (pdev,1 ); + dev_priv->mmio_start =pci_resource_start (pdev,2 ); dev_priv->assume_16bpp = !!vmw_assume_16bpp;
@@ -840,7 +841,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) dev->dev_private = dev_priv; - ret =pci_request_regions (dev->pdev,"vmwgfx probe" ); + ret =pci_request_regions (pdev,"vmwgfx probe" ); dev_priv->stealth = (ret !=0 );if (dev_priv->stealth) {/**
@@ -849,7 +850,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)DRM_INFO ("It appears like vesafb is loaded. " "Ignore above error if any.\n" ); - ret =pci_request_region (dev->pdev,2 ,"vmwgfx stealth probe" ); + ret =pci_request_region (pdev,2 ,"vmwgfx stealth probe" );if (unlikely (ret !=0 )) {DRM_ERROR ("Failed reserving the SVGA MMIO resource.\n" ); goto out_no_device;
@@ -857,7 +858,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) }if (dev_priv->capabilities &SVGA_CAP_IRQMASK ) { - ret =vmw_irq_install (dev, dev->pdev->irq); + ret =vmw_irq_install (dev, pdev->irq);if (ret !=0 ) {DRM_ERROR ("Failed installing irq: %d\n" , ret); goto out_no_irq;
@@ -1003,9 +1004,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)vmw_irq_uninstall (dev_priv->dev); out_no_irq:if (dev_priv->stealth) -pci_release_region (dev->pdev,2 ); +pci_release_region (pdev,2 );else -pci_release_regions (dev->pdev); +pci_release_regions (pdev); out_no_device:ttm_object_device_release (&dev_priv->tdev); out_err4:
@@ -1023,6 +1024,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)static void vmw_driver_unload (struct drm_device *dev) {struct vmw_private *dev_priv =vmw_priv (dev); +struct pci_dev *pdev =to_pci_dev (dev->dev);enum vmw_res_type i;unregister_pm_notifier (&dev_priv->pm_nb);
@@ -1054,9 +1056,9 @@ static void vmw_driver_unload(struct drm_device *dev)if (dev_priv->capabilities &SVGA_CAP_IRQMASK )vmw_irq_uninstall (dev_priv->dev);if (dev_priv->stealth) -pci_release_region (dev->pdev,2 ); +pci_release_region (pdev,2 );else -pci_release_regions (dev->pdev); +pci_release_regions (pdev);ttm_object_device_release (&dev_priv->tdev);memunmap (dev_priv->mmio_virt);
@@ -1409,7 +1411,7 @@ static int vmw_pm_freeze(struct device *kdev)vmw_fence_fifo_down (dev_priv->fman);__vmw_svga_disable (dev_priv); - +vmw_release_device_late (dev_priv);return 0 ; }
@@ -1520,7 +1522,6 @@ static int vmw_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_pci_disable_device; } - dev->pdev = pdev;pci_set_drvdata (pdev, dev); ret =vmw_driver_load (dev, ent->driver_data);
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +1 -1
@@ -638,7 +638,7 @@ static const struct fb_ops vmw_fb_ops = {int vmw_fb_init (struct vmw_private *vmw_priv) { -struct device *device = &vmw_priv->dev->pdev->dev; +struct device *device = vmw_priv->dev->dev;struct vmw_fb_par *par;struct fb_info *info;unsigned fb_width, fb_height;
Signature · 1 line
2.29.2
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-
z
Thomas Zimmermann
maintainerRe: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:
Quoted 7 lines
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-Reviewed-by Zack Rusin <[email protected]>
Could you add this patch to the vmwgfx tree?
Best regards
Thomas
Quoted 3 lines
z
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Thomas Zimmermann
maintainerRe: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 17 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:
Quoted 14 lines
Quoted 13 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c| 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-
Quoted 3 lines
Quoted 1 line
Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Best regards
Thomas
Quoted 14 lines
Best regards
ThomasQuoted 3 lines
z
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 23 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 16 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:Quoted 14 lines
Quoted 13 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Sounds good. I’ll make sure to rebase our latest patch set on top of it when it’s in. Thanks!
z
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 24 lines · Zack Rusin
Quoted 24 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 16 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:Quoted 14 lines
Quoted 13 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Sounds good. I’ll make sure to rebase our latest patch set on top of it when it’s in. Thanks!
btw if you want to avoid multi-tree coordination headaches, we can also manage vmwgfx in drm-misc and give you & Roland commit rights there. Up to you. There is some scripting involved for now (but I hope whenever we move to gitlab we could do the checks server-side):
https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html
Cheers, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 32 lines · Daniel Vetter
Quoted 27 lines · Zack Rusin
Quoted 27 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 18 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:Quoted 7 lines
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Sounds good. I’ll make sure to rebase our latest patch set on top of it when it’s in. Thanks!
btw if you want to avoid multi-tree coordination headaches, we can also manage vmwgfx in drm-misc and give you & Roland commit rights there. Up to you. There is some scripting involved for now (but I hope whenever we move to gitlab we could do the checks server-side):
I’d be happy to take you up on that. I would like to move a lot more of our development into public repos and reducing the burden of maintaining multiple trees would help. Is there a lot of changes to drm core that doesn’t go through drm-misc? Or alternatively is drm-misc often pulling from Linus’ master? I’m trying to figure out how much would our need to rebase/merge be reduced if we just used drm-misc-next/drm-misc-fixes because that would also allow me to point some internal testing infrastructure at it as well.
z
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 41 lines · Zack Rusin
Quoted 32 lines · Daniel Vetter
Quoted 27 lines · Zack Rusin
Quoted 27 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 18 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:Quoted 7 lines
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Sounds good. I’ll make sure to rebase our latest patch set on top of it when it’s in. Thanks!
btw if you want to avoid multi-tree coordination headaches, we can also manage vmwgfx in drm-misc and give you & Roland commit rights there. Up to you. There is some scripting involved for now (but I hope whenever we move to gitlab we could do the checks server-side):
Quoted 8 lines
I’d be happy to take you up on that. I would like to move a lot more of our development into public repos and reducing the burden of maintaining multiple trees would help. Is there a lot of changes to drm core that doesn’t go through drm-misc? Or alternatively is drm-misc often pulling from Linus’ master? I’m trying to figure out how much would our need to rebase/merge be reduced if we just used drm-misc-next/drm-misc-fixes because that would also allow me to point some internal testing infrastructure at it as well.
I think nowadays pretty much all the cross-driver work lands through drm-misc. Exception is just new stuff that's only used by a single driver.
For testing there's also drm-tip, which tries to pull it all together (but you might still want to point your CI at branches).
Also note that drm-misc-next doesn't have a merge window freeze period (with have the drm-misc-next-fixes branch during that time for merge window fixes), so you can treat it like a main development branch like e.g. in mesa, with the -fixes branches as the release branches. Only difference is that we don't cherry pick patches from the main branch to the release branches (at least not as the normal flow).
If you do need a backmerge for patches from Linus to drm-misc-next because of some feature work (or conflicts with other stuff in general) drm-misc maintainers do that. Usually happens every few weeks.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev
Quoted 68 lines · Daniel Vetter
Quoted 41 lines · Zack Rusin
Quoted 32 lines · Daniel Vetter
Quoted 27 lines · Zack Rusin
Quoted 27 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:01 schrieb Thomas Zimmermann:
Quoted 18 lines
Hi
Am 30.11.20 um 21:59 schrieb Zack Rusin:Quoted 7 lines
Quoted 7 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert vmwgfx to struct drm_device.dev. No functional changes.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc Roland Scheidegger <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 27 +++++++++++++------------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +-Reviewed-by Zack Rusin <[email protected]>Could you add this patch to the vmwgfx tree?
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
AMD devs indicated that they'd prefer to merge the patchset trough drm-misc-next. If you're OK with that, I'd merge the vmwgfx patch through drm-misc-next as well.
Sounds good. I’ll make sure to rebase our latest patch set on top of it when it’s in. Thanks!
btw if you want to avoid multi-tree coordination headaches, we can also manage vmwgfx in drm-misc and give you & Roland commit rights there. Up to you. There is some scripting involved for now (but I hope whenever we move to gitlab we could do the checks server-side):
Quoted 8 lines
I’d be happy to take you up on that. I would like to move a lot more of our development into public repos and reducing the burden of maintaining multiple trees would help. Is there a lot of changes to drm core that doesn’t go through drm-misc? Or alternatively is drm-misc often pulling from Linus’ master? I’m trying to figure out how much would our need to rebase/merge be reduced if we just used drm-misc-next/drm-misc-fixes because that would also allow me to point some internal testing infrastructure at it as well.
I think nowadays pretty much all the cross-driver work lands through drm-misc. Exception is just new stuff that's only used by a single driver.
For testing there's also drm-tip, which tries to pull it all together (but you might still want to point your CI at branches).
Also note that drm-misc-next doesn't have a merge window freeze period (with have the drm-misc-next-fixes branch during that time for merge window fixes), so you can treat it like a main development branch like e.g. in mesa, with the -fixes branches as the release branches. Only difference is that we don't cherry pick patches from the main branch to the release branches (at least not as the normal flow).
Quoted 3 lines
If you do need a backmerge for patches from Linus to drm-misc-next because of some feature work (or conflicts with other stuff in general) drm-misc maintainers do that. Usually happens every few weeks.
Perfect, thanks a lot! This has been something I wanted our driver to do for a while, I’ll go ahead and switch our internal dev to drm-misc.
z
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thomas Zimmermann
maintainerPATCH 15/15 drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
In reply to Thomas ZimmermannWe have DRM drivers based on USB, SPI and platform devices. All of them are fine with storing their device reference in struct drm_device.dev. PCI devices should be no exception. Therefore struct drm_device.pdev is deprecated.
Instead upcast from struct drm_device.dev with to_pci_dev(). PCI-specific code can use dev_is_pci() to test for a PCI device. This patch changes the DRM core code and documentation accordingly. Struct drm_device.pdev is being moved to legacy status.
--- drivers/gpu/drm/drm_agpsupport.c | 9 ++++++--- drivers/gpu/drm/drm_bufs.c | 4 ++-- drivers/gpu/drm/drm_edid.c | 7 ++++++- drivers/gpu/drm/drm_irq.c | 12 +++++++----- drivers/gpu/drm/drm_pci.c | 26 +++++++++++++++----------- drivers/gpu/drm/drm_vm.c | 2 +- include/drm/drm_device.h | 12 +++++++++--- 7 files changed, 46 insertions(+), 26 deletions(-)
drivers/gpu/drm/drm_agpsupport.c +6 -3
@@ -103,11 +103,13 @@ int drm_agp_info_ioctl(struct drm_device *dev, void *data,*/ int drm_agp_acquire (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +if (!dev->agp)return -ENODEV ;if (dev->agp->acquired)return -EBUSY ; - dev->agp->bridge =agp_backend_acquire (dev->pdev); + dev->agp->bridge =agp_backend_acquire (pdev);if (!dev->agp->bridge)return -ENODEV ; dev->agp->acquired =1 ;
@@ -402,14 +404,15 @@ int drm_agp_free_ioctl(struct drm_device *dev, void *data,*/ struct drm_agp_head *drm_agp_init (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_agp_head *head =NULL ; head =kzalloc (sizeof (*head),GFP_KERNEL );if (!head)return NULL ; - head->bridge =agp_find_bridge (dev->pdev); + head->bridge =agp_find_bridge (pdev);if (!head->bridge) { - head->bridge =agp_backend_acquire (dev->pdev); + head->bridge =agp_backend_acquire (pdev);if (!head->bridge) {kfree (head);return NULL ;
drivers/gpu/drm/drm_bufs.c +2 -2
@@ -325,7 +325,7 @@ static int drm_addmap_core(struct drm_device *dev, resource_size_t offset,* As we're limiting the address to 2^32-1 (or less), * casting it down to 32 bits is no problem, but we * need to point to a 64bit variable first. */ - map->handle =dma_alloc_coherent (&dev->pdev->dev, + map->handle =dma_alloc_coherent (dev->dev, map->size, &map->offset,GFP_KERNEL );
@@ -555,7 +555,7 @@ int drm_legacy_rmmap_locked(struct drm_device *dev, struct drm_local_map *map)case _DRM_SCATTER_GATHER:break ;case _DRM_CONSISTENT: -dma_free_coherent (&dev->pdev->dev, +dma_free_coherent (dev->dev, map->size, map->handle, map->offset);
drivers/gpu/drm/drm_edid.c +6 -1
@@ -32,6 +32,7 @@#include <linux/i2c.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/pci.h> #include <linux/slab.h> #include <linux/vga_switcheroo.h>
@@ -2075,9 +2076,13 @@ EXPORT_SYMBOL(drm_get_edid);struct edid *drm_get_edid_switcheroo (struct drm_connector *connector,struct i2c_adapter *adapter) { -struct pci_dev *pdev = connector->dev->pdev; +struct drm_device *dev = connector->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct edid *edid; +if (drm_WARN_ON_ONCE (dev, !dev_is_pci (dev->dev))) +return NULL ; +vga_switcheroo_lock_ddc (pdev); edid =drm_get_edid (connector, adapter);vga_switcheroo_unlock_ddc (pdev);
drivers/gpu/drm/drm_irq.c +7 -5
@@ -122,7 +122,7 @@ int drm_irq_install(struct drm_device *dev, int irq) dev->driver->irq_preinstall (dev);/* PCI devices require shared interrupts. */ -if (dev->pdev) +if (dev_is_pci (dev->dev)) sh_flags =IRQF_SHARED ; ret = request_irq(irq, dev->driver->irq_handler,
@@ -140,7 +140,7 @@ int drm_irq_install(struct drm_device *dev, int irq)if (ret <0 ) { dev->irq_enabled = false;if (drm_core_check_feature (dev,DRIVER_LEGACY )) -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (to_pci_dev (dev->dev),NULL ,NULL ,NULL );free_irq (irq, dev); }else { dev->irq = irq;
@@ -203,7 +203,7 @@ int drm_irq_uninstall(struct drm_device *dev)DRM_DEBUG ("irq=%d\n" , dev->irq);if (drm_core_check_feature (dev,DRIVER_LEGACY )) -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (to_pci_dev (dev->dev),NULL ,NULL ,NULL );if (dev->driver->irq_uninstall) dev->driver->irq_uninstall (dev);
@@ -220,6 +220,7 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data, {struct drm_control *ctl = data;int ret =0 , irq; +struct pci_dev *pdev;/* if we haven't irq we fallback for compatibility reasons - * this used to be a separate function in drm_dma.h
@@ -230,12 +231,13 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,if (!drm_core_check_feature (dev,DRIVER_LEGACY ))return 0 ;/* UMS was only ever supported on pci devices. */ -if (WARN_ON (!dev->pdev)) +if (WARN_ON (!dev_is_pci (dev->dev)))return -EINVAL ;switch (ctl->func) {case DRM_INST_HANDLER : - irq = dev->pdev->irq; + pdev =to_pci_dev (dev->dev); + irq = pdev->irq;if (dev->if_version <DRM_IF_VERSION (1 ,2 ) && ctl->irq != irq)
drivers/gpu/drm/drm_pci.c +15 -11
@@ -65,7 +65,7 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t alireturn NULL ; dmah->size = size; - dmah->vaddr =dma_alloc_coherent (&dev->pdev->dev, size, + dmah->vaddr =dma_alloc_coherent (dev->dev, size, &dmah->busaddr,GFP_KERNEL );
@@ -88,7 +88,7 @@ EXPORT_SYMBOL(drm_pci_alloc);*/ void drm_pci_free (struct drm_device * dev,drm_dma_handle_t * dmah) { -dma_free_coherent (&dev->pdev->dev, dmah->size, dmah->vaddr, +dma_free_coherent (dev->dev, dmah->size, dmah->vaddr, dmah->busaddr);kfree (dmah); }
@@ -107,16 +107,18 @@ static int drm_get_pci_domain(struct drm_device *dev)return 0 ;#endif /* __alpha__ */ -return pci_domain_nr (dev->pdev->bus); +return pci_domain_nr (to_pci_dev (dev->dev)->bus); }int drm_pci_set_busid (struct drm_device *dev,struct drm_master *master) { +struct pci_dev *pdev =to_pci_dev (dev->dev); + master->unique =kasprintf (GFP_KERNEL ,"pci:%04x:%02x:%02x.%d" ,drm_get_pci_domain (dev), - dev->pdev->bus->number, -PCI_SLOT (dev->pdev->devfn), -PCI_FUNC (dev->pdev->devfn)); + pdev->bus->number, +PCI_SLOT (pdev->devfn), +PCI_FUNC (pdev->devfn));if (!master->unique)return -ENOMEM ;
@@ -126,12 +128,14 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)static int drm_pci_irq_by_busid (struct drm_device *dev,struct drm_irq_busid *p) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +if ((p->busnum >>8 ) !=drm_get_pci_domain (dev) || - (p->busnum &0xff ) != dev->pdev->bus->number || - p->devnum !=PCI_SLOT (dev->pdev->devfn) || p->funcnum !=PCI_FUNC (dev->pdev->devfn)) + (p->busnum &0xff ) != pdev->bus->number || + p->devnum !=PCI_SLOT (pdev->devfn) || p->funcnum !=PCI_FUNC (pdev->devfn))return -EINVAL ; - p->irq = dev->pdev->irq; + p->irq = pdev->irq;DRM_DEBUG ("%d:%d:%d => IRQ %d\n" , p->busnum, p->devnum, p->funcnum, p->irq);
@@ -159,7 +163,7 @@ int drm_legacy_irq_by_busid(struct drm_device *dev, void *data,return -EOPNOTSUPP ;/* UMS was only ever support on PCI devices. */ -if (WARN_ON (!dev->pdev)) +if (WARN_ON (!dev_is_pci (dev->dev)))return -EINVAL ;if (!drm_core_check_feature (dev,DRIVER_HAVE_IRQ ))
@@ -183,7 +187,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)static void drm_pci_agp_init (struct drm_device *dev) {if (drm_core_check_feature (dev,DRIVER_USE_AGP )) { -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) +if (pci_find_capability (to_pci_dev (dev->dev),PCI_CAP_ID_AGP )) dev->agp =drm_agp_init (dev);if (dev->agp) { dev->agp->agp_mtrr = arch_phys_wc_add(
drivers/gpu/drm/drm_vm.c +1 -1
@@ -278,7 +278,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)case _DRM_SCATTER_GATHER:break ;case _DRM_CONSISTENT: -dma_free_coherent (&dev->pdev->dev, +dma_free_coherent (dev->dev, map->size, map->handle, map->offset);
include/drm/drm_device.h +9 -3
@@ -290,9 +290,6 @@ struct drm_device {/** @agp: AGP data */ struct drm_agp_head *agp; -/** @pdev: PCI device structure */ -struct pci_dev *pdev; -#ifdef __alpha__/** @hose: PCI hose, only used on ALPHA platforms. */ struct pci_controller *hose;
@@ -336,6 +333,15 @@ struct drm_device {/* Everything below here is for legacy driver, never use! */ /* private: */ #if IS_ENABLED (CONFIG_DRM_LEGACY ) +/** +* @pdev: PCI device structure +* +* This is deprecated. to get the PCI device, upcast from @dev +* with to_pci_dev(). To test if the hardware is a PCI device, +* use dev_is_pci() with @dev. +*/ +struct pci_dev *pdev; +/* Context handle management - linked list of context handles */ struct list_head ctxlist;
Signature · 1 line
2.29.2
Re: [PATCH 15/15] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
Hi Thomas,
Quoted 93 lines · Thomas Zimmermann
We have DRM drivers based on USB, SPI and platform devices. All of them are fine with storing their device reference in struct drm_device.dev. PCI devices should be no exception. Therefore struct drm_device.pdev is deprecated.
Instead upcast from struct drm_device.dev with
to_pci_dev(). PCI-specific code can usedev_is_pci()to test for a PCI device. This patch changes the DRM core code and documentation accordingly. Struct drm_device.pdev is being moved to legacy status.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/drm_agpsupport.c | 9 ++++++--- drivers/gpu/drm/drm_bufs.c | 4 ++-- drivers/gpu/drm/drm_edid.c | 7 ++++++- drivers/gpu/drm/drm_irq.c | 12 +++++++----- drivers/gpu/drm/drm_pci.c | 26 +++++++++++++++----------- drivers/gpu/drm/drm_vm.c | 2 +- include/drm/drm_device.h | 12 +++++++++--- 7 files changed, 46 insertions(+), 26 deletions(-)drivers/gpu/drm/drm_agpsupport.c +6
-3@@ -103,11 +103,13 @@ int drm_agp_info_ioctl(struct drm_device *dev, void *data,*/ int drm_agp_acquire (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +if (!dev->agp)return -ENODEV ;if (dev->agp->acquired)return -EBUSY ; - dev->agp->bridge =agp_backend_acquire (dev->pdev); + dev->agp->bridge =agp_backend_acquire (pdev);if (!dev->agp->bridge)return -ENODEV ; dev->agp->acquired =1 ;@@ -402,14 +404,15 @@ int drm_agp_free_ioctl(struct drm_device *dev, void *data,*/ struct drm_agp_head *drm_agp_init (struct drm_device *dev) { +struct pci_dev *pdev =to_pci_dev (dev->dev);struct drm_agp_head *head =NULL ; head =kzalloc (sizeof (*head),GFP_KERNEL );if (!head)return NULL ; - head->bridge =agp_find_bridge (dev->pdev); + head->bridge =agp_find_bridge (pdev);if (!head->bridge) { - head->bridge =agp_backend_acquire (dev->pdev); + head->bridge =agp_backend_acquire (pdev);if (!head->bridge) {kfree (head);return NULL ;drivers/gpu/drm/drm_bufs.c +2
-2@@ -325,7 +325,7 @@ static int drm_addmap_core(struct drm_device *dev, resource_size_t offset,* As we're limiting the address to 2^32-1 (or less), * casting it down to 32 bits is no problem, but we * need to point to a 64bit variable first. */ - map->handle =dma_alloc_coherent (&dev->pdev->dev, + map->handle =dma_alloc_coherent (dev->dev, map->size, &map->offset,GFP_KERNEL );@@ -555,7 +555,7 @@ int drm_legacy_rmmap_locked(struct drm_device *dev, struct drm_local_map *map)case _DRM_SCATTER_GATHER:break ;case _DRM_CONSISTENT: -dma_free_coherent (&dev->pdev->dev, +dma_free_coherent (dev->dev, map->size, map->handle, map->offset);drivers/gpu/drm/drm_edid.c +1
-0@@ -32,6 +32,7 @@#include <linux/i2c.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/pci.h> #include <linux/slab.h> #include <linux/vga_switcheroo.h>
drivers/gpu/drm/drm_edid.c EXPORT_SYMBOL(drm_get_edid); · line 2081
Quoted 7 lines
drivers/gpu/drm/drm_edid.c +2
-1@@ -2075,9 +2076,13 @@ EXPORT_SYMBOL(drm_get_edid);struct edid *drm_get_edid_switcheroo (struct drm_connector *connector,struct i2c_adapter *adapter) { -struct pci_dev *pdev = connector->dev->pdev; +struct drm_device *dev = connector->dev; +struct pci_dev *pdev =to_pci_dev (dev->dev);struct edid *edid;
Maybe add a comment that explain why this can trigger - so people are helped it they are catched by this.
As it is now it is not even mentioned in the changelog.
Quoted 170 lines
drivers/gpu/drm/drm_edid.c +3
-0+if (drm_WARN_ON_ONCE (dev, !dev_is_pci (dev->dev))) +return NULL ; +vga_switcheroo_lock_ddc (pdev); edid =drm_get_edid (connector, adapter);vga_switcheroo_unlock_ddc (pdev);drivers/gpu/drm/drm_irq.c +7
-5@@ -122,7 +122,7 @@ int drm_irq_install(struct drm_device *dev, int irq) dev->driver->irq_preinstall (dev);/* PCI devices require shared interrupts. */ -if (dev->pdev) +if (dev_is_pci (dev->dev)) sh_flags =IRQF_SHARED ; ret = request_irq(irq, dev->driver->irq_handler,@@ -140,7 +140,7 @@ int drm_irq_install(struct drm_device *dev, int irq)if (ret <0 ) { dev->irq_enabled = false;if (drm_core_check_feature (dev,DRIVER_LEGACY )) -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (to_pci_dev (dev->dev),NULL ,NULL ,NULL );free_irq (irq, dev); }else { dev->irq = irq;@@ -203,7 +203,7 @@ int drm_irq_uninstall(struct drm_device *dev)DRM_DEBUG ("irq=%d\n" , dev->irq);if (drm_core_check_feature (dev,DRIVER_LEGACY )) -vga_client_register (dev->pdev,NULL ,NULL ,NULL ); +vga_client_register (to_pci_dev (dev->dev),NULL ,NULL ,NULL );if (dev->driver->irq_uninstall) dev->driver->irq_uninstall (dev);@@ -220,6 +220,7 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data, {struct drm_control *ctl = data;int ret =0 , irq; +struct pci_dev *pdev;/* if we haven't irq we fallback for compatibility reasons - * this used to be a separate function in drm_dma.h @@ -230,12 +231,13 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,if (!drm_core_check_feature (dev,DRIVER_LEGACY ))return 0 ;/* UMS was only ever supported on pci devices. */ -if (WARN_ON (!dev->pdev)) +if (WARN_ON (!dev_is_pci (dev->dev)))return -EINVAL ;switch (ctl->func) {case DRM_INST_HANDLER : - irq = dev->pdev->irq; + pdev =to_pci_dev (dev->dev); + irq = pdev->irq;if (dev->if_version <DRM_IF_VERSION (1 ,2 ) && ctl->irq != irq)drivers/gpu/drm/drm_pci.c +15
-11@@ -65,7 +65,7 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t alireturn NULL ; dmah->size = size; - dmah->vaddr =dma_alloc_coherent (&dev->pdev->dev, size, + dmah->vaddr =dma_alloc_coherent (dev->dev, size, &dmah->busaddr,GFP_KERNEL );@@ -88,7 +88,7 @@ EXPORT_SYMBOL(drm_pci_alloc);*/ void drm_pci_free (struct drm_device * dev,drm_dma_handle_t * dmah) { -dma_free_coherent (&dev->pdev->dev, dmah->size, dmah->vaddr, +dma_free_coherent (dev->dev, dmah->size, dmah->vaddr, dmah->busaddr);kfree (dmah); }@@ -107,16 +107,18 @@ static int drm_get_pci_domain(struct drm_device *dev)return 0 ;#endif /* __alpha__ */ -return pci_domain_nr (dev->pdev->bus); +return pci_domain_nr (to_pci_dev (dev->dev)->bus); }int drm_pci_set_busid (struct drm_device *dev,struct drm_master *master) { +struct pci_dev *pdev =to_pci_dev (dev->dev); + master->unique =kasprintf (GFP_KERNEL ,"pci:%04x:%02x:%02x.%d" ,drm_get_pci_domain (dev), - dev->pdev->bus->number, -PCI_SLOT (dev->pdev->devfn), -PCI_FUNC (dev->pdev->devfn)); + pdev->bus->number, +PCI_SLOT (pdev->devfn), +PCI_FUNC (pdev->devfn));if (!master->unique)return -ENOMEM ;@@ -126,12 +128,14 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)static int drm_pci_irq_by_busid (struct drm_device *dev,struct drm_irq_busid *p) { +struct pci_dev *pdev =to_pci_dev (dev->dev); +if ((p->busnum >>8 ) !=drm_get_pci_domain (dev) || - (p->busnum &0xff ) != dev->pdev->bus->number || - p->devnum !=PCI_SLOT (dev->pdev->devfn) || p->funcnum !=PCI_FUNC (dev->pdev->devfn)) + (p->busnum &0xff ) != pdev->bus->number || + p->devnum !=PCI_SLOT (pdev->devfn) || p->funcnum !=PCI_FUNC (pdev->devfn))return -EINVAL ; - p->irq = dev->pdev->irq; + p->irq = pdev->irq;DRM_DEBUG ("%d:%d:%d => IRQ %d\n" , p->busnum, p->devnum, p->funcnum, p->irq);@@ -159,7 +163,7 @@ int drm_legacy_irq_by_busid(struct drm_device *dev, void *data,return -EOPNOTSUPP ;/* UMS was only ever support on PCI devices. */ -if (WARN_ON (!dev->pdev)) +if (WARN_ON (!dev_is_pci (dev->dev)))return -EINVAL ;if (!drm_core_check_feature (dev,DRIVER_HAVE_IRQ ))@@ -183,7 +187,7 @@ void drm_pci_agp_destroy(struct drm_device *dev)static void drm_pci_agp_init (struct drm_device *dev) {if (drm_core_check_feature (dev,DRIVER_USE_AGP )) { -if (pci_find_capability (dev->pdev,PCI_CAP_ID_AGP )) +if (pci_find_capability (to_pci_dev (dev->dev),PCI_CAP_ID_AGP )) dev->agp =drm_agp_init (dev);if (dev->agp) { dev->agp->agp_mtrr = arch_phys_wc_add(drivers/gpu/drm/drm_vm.c +1
-1@@ -278,7 +278,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)case _DRM_SCATTER_GATHER:break ;case _DRM_CONSISTENT: -dma_free_coherent (&dev->pdev->dev, +dma_free_coherent (dev->dev, map->size, map->handle, map->offset);include/drm/drm_device.h +0
-3@@ -290,9 +290,6 @@ struct drm_device {/** @agp: AGP data */ struct drm_agp_head *agp; -/** @pdev: PCI device structure */ -struct pci_dev *pdev; -#ifdef __alpha__/** @hose: PCI hose, only used on ALPHA platforms. */ struct pci_controller *hose;
include/drm/drm_device.h struct drm_device { · line 339
Quoted 7 lines
include/drm/drm_device.h +4
-0@@ -336,6 +333,15 @@ struct drm_device {/* Everything below here is for legacy driver, never use! */ /* private: */ #if IS_ENABLED (CONFIG_DRM_LEGACY ) +/** +* @pdev: PCI device structure +* +* This is deprecated. to get the PCI device, upcast from @dev
Capital T after '.'
Quoted 15 lines
include/drm/drm_device.h +5
-0+* with to_pci_dev(). To test if the hardware is a PCI device, +* use dev_is_pci() with @dev. +*/ +struct pci_dev *pdev; +/* Context handle management - linked list of context handles */ struct list_head ctxlist;Signature · 6 lines
2.29.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Move struct drm_device.pdev to legacy
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy
URL : https://patchwork.freedesktop.org/series/84205/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip a05395880eb4 drm/amdgpu: Remove references to struct drm_device.pdev a19d9609caa5 drm/ast: Remove references to struct drm_device.pdev 69271c471b3c drm/bochs: Remove references to struct drm_device.pdev 5b6a109e50c6 drm/cirrus: Remove references to struct drm_device.pdev -:12: WARNING:OBSOLETE: drivers/gpu/drm/tiny/cirrus.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
-:15: WARNING:OBSOLETE: drivers/gpu/drm/tiny/cirrus.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
total: 0 errors, 2 warnings, 0 checks, 7 lines checked f61db0e140d6 drm/gma500: Remove references to struct drm_device.pdev -:89: CHECK:CAMELCASE: Avoid CamelCase: <saveLBB>
#89: FILE: drivers/gpu/drm/gma500/cdv_device.c:269:
+ pci_read_config_byte(pdev, 0xF4, ®s->cdv.saveLBB);
-:158: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #158: FILE: drivers/gpu/drm/gma500/cdv_intel_crt.c:281:
+ dev_printk(KERN_ERR, dev->dev, "DDC bus registration failed.\n");
-:180: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #180: FILE: drivers/gpu/drm/gma500/cdv_intel_lvds.c:578:
+ dev_printk(KERN_ERR, dev->dev,
-:221: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around dev->mode_config.fb_base #221: FILE: drivers/gpu/drm/gma500/framebuffer.c:545:
+ pci_read_config_dword(pdev, PSB_BSM, (u32 *)&(dev->mode_config.fb_base));
-:720: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #720: FILE: drivers/gpu/drm/gma500/psb_intel_lvds.c:722:
+ dev_printk(KERN_ERR, dev->dev,
-:749: WARNING:LONG_LINE: line length of 116 exceeds 100 columns #749: FILE: drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c:459:
+ dev_warn(dev->dev, "GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n", pwmctrl);
total: 0 errors, 4 warnings, 2 checks, 658 lines checked43de488f0ae9 drm/hibmc: Remove references to struct drm_device.pdev01a8ea96ca1c drm/i915: Remove references to struct drm_device.pdevf83b2e33ec46 drm/mgag200: Remove references to struct drm_device.pdev23269c980b19 drm/nouveau: Remove references to struct drm_device.pdevf3f907d41b1b drm/qxl: Remove references to struct drm_device.pdev997d0814d5cf drm/radeon: Remove references to struct drm_device.pdev
-:27: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x71C5' #27: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:27: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x106b' #27: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:27: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0080' #27: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016c' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016d' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016e' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016f' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0170' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x017d' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x017e' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0183' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x018a' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:69: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x019a' #69: FILE: drivers/gpu/drm/radeon/r100.c:2641:
+ if ((rdev->pdev->subsystem_vendor == 0x1028 /* DELL */) &&
+ ((rdev->pdev->subsystem_device == 0x016c) || + (rdev->pdev->subsystem_device == 0x016d) || + (rdev->pdev->subsystem_device == 0x016e) || + (rdev->pdev->subsystem_device == 0x016f) || + (rdev->pdev->subsystem_device == 0x0170) || + (rdev->pdev->subsystem_device == 0x017d) || + (rdev->pdev->subsystem_device == 0x017e) || + (rdev->pdev->subsystem_device == 0x0183) || + (rdev->pdev->subsystem_device == 0x018a) ||
+ (rdev->pdev->subsystem_device == 0x019a)))
-:108: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rdev' - possible side-effects? #108: FILE: drivers/gpu/drm/radeon/radeon.h:2626:
+#define ASIC_IS_X2(rdev) ((rdev->pdev->device == 0x9441) || \
+ (rdev->pdev->device == 0x9443) || \ + (rdev->pdev->device == 0x944B) || \ + (rdev->pdev->device == 0x9506) || \ + (rdev->pdev->device == 0x9509) || \ + (rdev->pdev->device == 0x950F) || \ + (rdev->pdev->device == 0x689C) || \
+ (rdev->pdev->device == 0x689D))
-:108: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'rdev' may be better as '(rdev)' to avoid precedence issues #108: FILE: drivers/gpu/drm/radeon/radeon.h:2626:
+#define ASIC_IS_X2(rdev) ((rdev->pdev->device == 0x9441) || \
+ (rdev->pdev->device == 0x9443) || \ + (rdev->pdev->device == 0x944B) || \ + (rdev->pdev->device == 0x9506) || \ + (rdev->pdev->device == 0x9509) || \ + (rdev->pdev->device == 0x950F) || \ + (rdev->pdev->device == 0x689C) || \
+ (rdev->pdev->device == 0x689D))
-:131: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rdev' - possible side-effects? #131: FILE: drivers/gpu/drm/radeon/radeon.h:2656:
+#define ASIC_IS_LOMBOK(rdev) ((rdev->pdev->device == 0x6849) || \
+ (rdev->pdev->device == 0x6850) || \ + (rdev->pdev->device == 0x6858) || \ + (rdev->pdev->device == 0x6859) || \ + (rdev->pdev->device == 0x6840) || \ + (rdev->pdev->device == 0x6841) || \ + (rdev->pdev->device == 0x6842) || \ + (rdev->pdev->device == 0x6843))
-:131: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'rdev' may be better as '(rdev)' to avoid precedence issues #131: FILE: drivers/gpu/drm/radeon/radeon.h:2656:
+#define ASIC_IS_LOMBOK(rdev) ((rdev->pdev->device == 0x6849) || \
+ (rdev->pdev->device == 0x6850) || \ + (rdev->pdev->device == 0x6858) || \ + (rdev->pdev->device == 0x6859) || \ + (rdev->pdev->device == 0x6840) || \ + (rdev->pdev->device == 0x6841) || \ + (rdev->pdev->device == 0x6842) || \ + (rdev->pdev->device == 0x6843))
-:156: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x791e' #156: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:156: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #156: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:156: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x826d' #156: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:168: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7941' #168: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:168: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1849' #168: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:168: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x7941' #168: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:180: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x796e' #180: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:180: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1462' #180: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:180: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x7302' #180: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:192: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7941' #192: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:192: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x147b' #192: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:192: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2412' #192: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:203: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x5653' #203: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:203: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1462' #203: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:203: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x0291' #203: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:216: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7146' #216: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:216: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x17af' #216: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:216: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2058' #216: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:227: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7142' #227: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:227: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1458' #227: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:227: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2134' #227: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:239: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x71C5' #239: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:239: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x106b' #239: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:239: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x0080' #239: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:252: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9598' #252: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:252: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #252: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:252: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01da' #252: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:264: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9598' #264: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:264: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #264: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:264: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01e4' #264: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:276: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x95C5' #276: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:276: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #276: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:276: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01e2' #276: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:289: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x95c4' #289: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:289: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9591' #289: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:289: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1025' #289: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:289: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x013c' #289: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:302: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9498' #302: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:436:
+ if ((pdev->device == 0x9498) &&
+ (pdev->subsystem_vendor == 0x1682) &&
+ (pdev->subsystem_device == 0x2452) &&
(i2c_bus->valid == false) &&
!(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) {
-:302: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1682' #302: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:436:
+ if ((pdev->device == 0x9498) &&
+ (pdev->subsystem_vendor == 0x1682) &&
+ (pdev->subsystem_device == 0x2452) &&
(i2c_bus->valid == false) &&
!(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) {
-:302: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2452' #302: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:436:
+ if ((pdev->device == 0x9498) &&
+ (pdev->subsystem_vendor == 0x1682) &&
+ (pdev->subsystem_device == 0x2452) &&
(i2c_bus->valid == false) &&
!(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) {
-:302: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'i2c_bus->valid == false' #302: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:436:
+ if ((pdev->device == 0x9498) &&
+ (pdev->subsystem_vendor == 0x1682) &&
+ (pdev->subsystem_device == 0x2452) &&
(i2c_bus->valid == false) &&
!(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) {
-:317: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9802' #317: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:446:
+ if (((pdev->device == 0x9802) || + (pdev->device == 0x9805) ||
+ (pdev->device == 0x9806)) &&
+ (pdev->subsystem_vendor == 0x1734) &&
+ (pdev->subsystem_device == 0x11bd)) {
-:317: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9805' #317: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:446:
+ if (((pdev->device == 0x9802) || + (pdev->device == 0x9805) ||
+ (pdev->device == 0x9806)) &&
+ (pdev->subsystem_vendor == 0x1734) &&
+ (pdev->subsystem_device == 0x11bd)) {
-:317: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9806' #317: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:446:
+ if (((pdev->device == 0x9802) || + (pdev->device == 0x9805) ||
+ (pdev->device == 0x9806)) &&
+ (pdev->subsystem_vendor == 0x1734) &&
+ (pdev->subsystem_device == 0x11bd)) {
-:317: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1734' #317: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:446:
+ if (((pdev->device == 0x9802) || + (pdev->device == 0x9805) ||
+ (pdev->device == 0x9806)) &&
+ (pdev->subsystem_vendor == 0x1734) &&
+ (pdev->subsystem_device == 0x11bd)) {
-:317: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x11bd' #317: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:446:
+ if (((pdev->device == 0x9802) || + (pdev->device == 0x9805) ||
+ (pdev->device == 0x9806)) &&
+ (pdev->subsystem_vendor == 0x1734) &&
+ (pdev->subsystem_device == 0x11bd)) {
-:334: WARNING:BRACES: braces {} are not necessary for single statement blocks #334: FILE: drivers/gpu/drm/radeon/radeon_bios.c:531:
+ if (rdev->pdev->device == PCI_DEVICE_ID_ATI_RADEON_QY) {
fp2_gen_cntl = RREG32(RADEON_FP2_GEN_CNTL);
}
-:343: WARNING:BRACES: braces {} are not necessary for single statement blocks #343: FILE: drivers/gpu/drm/radeon/radeon_bios.c:568:
+ if (rdev->pdev->device == PCI_DEVICE_ID_ATI_RADEON_QY) {
WREG32(RADEON_FP2_GEN_CNTL, (fp2_gen_cntl & ~RADEON_FP2_ON));
}
-:352: WARNING:BRACES: braces {} are not necessary for single statement blocks #352: FILE: drivers/gpu/drm/radeon/radeon_bios.c:586:
+ if (rdev->pdev->device == PCI_DEVICE_ID_ATI_RADEON_QY) {
WREG32(RADEON_FP2_GEN_CNTL, fp2_gen_cntl);
}
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x5159' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
+ ((rdev->pdev->device == 0x514D) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7149))) {
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x174B' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
+ ((rdev->pdev->device == 0x514D) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7149))) {
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x7c28' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
+ ((rdev->pdev->device == 0x514D) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7149))) {
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x514D' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
+ ((rdev->pdev->device == 0x514D) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7149))) {
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x174B' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
+ ((rdev->pdev->device == 0x514D) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7149))) {
-:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x7149' #367: FILE: drivers/gpu/drm/radeon/radeon_combios.c:901:
+ if (((rdev->pdev->device == 0x5159) &&
+ (rdev->pdev->subsystem_vendor == 0x174B) &&
+ (rdev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Move struct drm_device.pdev to legacy
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy
URL : https://patchwork.freedesktop.org/series/84205/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9382 -> Patchwork_18963
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/index.html
New tests
---------
New tests have been introduced between CI_DRM_9382 and Patchwork_18963:
### New CI tests (1) ###
* boot:
- Statuses : 39 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18963 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@read_all_entries:
- fi-tgl-y: [PASS][1] -> [DMESG-WARN][2] ([i915#402]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-tgl-y/igt@debugfs_test@read_all_entries.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-tgl-y/igt@debugfs_test@read_all_entries.html
* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [PASS][3] -> [FAIL][4] ([i915#1888])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-tgl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-tgl-u2/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-byt-j1900/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-byt-j1900/igt@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-tgl-y: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-tgl-y/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-tgl-y/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_create@basic:
- fi-icl-u2: [INCOMPLETE][9] -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-icl-u2/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-byt-j1900: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-byt-j1900/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-byt-j1900/igt@[email protected]
* igt@kms_busy@basic@flip:
- fi-kbl-soraka: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-kbl-soraka/igt@kms_busy@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-kbl-soraka/igt@kms_busy@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- {fi-kbl-7560u}: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-kbl-7560u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-kbl-7560u/igt@[email protected]
- fi-apl-guc: [DMESG-WARN][17] ([i915#1635] / [i915#1982]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-apl-guc/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-apl-guc/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- fi-tgl-y: [DMESG-WARN][19] ([i915#402]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-tgl-y/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-tgl-y/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-tgl-y: [DMESG-WARN][21] ([i915#2411]) -> [DMESG-WARN][22] ([i915#1982] / [i915#2411])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/fi-tgl-y/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/fi-tgl-y/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
Participating hosts (42 -> 39)
------------------------------
Additional (1): fi-blb-e6850
Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_9382 -> Patchwork_18963
CI-20190529: 20190529
CI_DRM_9382: ac60f3f3090115d21f028bffa2dcfb67f695c4f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5869: 5236e5d4be3ab5e2fedacc32152120b7fb77bf9f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18963: 3fe494566d7d9e608a50e509ab2ea30f86e1c212 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
3fe494566d7d drm: Upcast struct drm_device.dev to struct pci_device; replace pdev 09e017e4b785 drm/vmwgfx: Remove references to struct drm_device.pdev 63021427dc95 drm/virtgpu: Remove references to struct drm_device.pdev 1a5e068421a4 drm/vboxvideo: Remove references to struct drm_device.pdev 997d0814d5cf drm/radeon: Remove references to struct drm_device.pdev f3f907d41b1b drm/qxl: Remove references to struct drm_device.pdev 23269c980b19 drm/nouveau: Remove references to struct drm_device.pdev f83b2e33ec46 drm/mgag200: Remove references to struct drm_device.pdev 01a8ea96ca1c drm/i915: Remove references to struct drm_device.pdev 43de488f0ae9 drm/hibmc: Remove references to struct drm_device.pdev f61db0e140d6 drm/gma500: Remove references to struct drm_device.pdev 5b6a109e50c6 drm/cirrus: Remove references to struct drm_device.pdev 69271c471b3c drm/bochs: Remove references to struct drm_device.pdev a19d9609caa5 drm/ast: Remove references to struct drm_device.pdev a05395880eb4 drm/amdgpu: Remove references to struct drm_device.pdev
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm: Move struct drm_device.pdev to legacy
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy
URL : https://patchwork.freedesktop.org/series/84205/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9382_full -> Patchwork_18963_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18963_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18963_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18963_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_eio@in-flight-internal-immediate:
- shard-glk: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-glk5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt:
- shard-glk: [PASS][2] -> [FAIL][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-glk2/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-glk1/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* {igt@gem_userptr_blits@huge-split}:
- shard-skl: [PASS][4] -> [INCOMPLETE][5]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl6/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_9382_full and Patchwork_18963_full:
### New CI tests (1) ###
* boot:
- Statuses : 199 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18963_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_whisper@basic-normal-all:
- shard-glk: [PASS][6] -> [DMESG-WARN][7] ([i915#118] / [i915#95])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-glk8/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-glk6/igt@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-skl: [PASS][8] -> [INCOMPLETE][9] ([i915#198])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl6/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl2/igt@[email protected]
* igt@kms_big_fb@linear-16bpp-rotate-0:
- shard-iclb: [PASS][10] -> [DMESG-WARN][11] ([i915#1226])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb1/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb2/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-64x21-onscreen:
- shard-skl: [PASS][12] -> [FAIL][13] ([i915#54])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl7/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl8/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-c-256x256-bottom-edge:
- shard-skl: [PASS][14] -> [DMESG-WARN][15] ([i915#1982]) +6 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl1/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl10/igt@[email protected]
* igt@kms_flip@2x-flip-vs-panning-interruptible@ab-vga1-hdmi-a1:
- shard-hsw: [PASS][16] -> [DMESG-WARN][17] ([i915#1982]) +2 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-hsw4/igt@kms_flip@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-hsw6/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-fb-recreate-interruptible@b-dp1:
- shard-kbl: [PASS][18] -> [FAIL][19] ([i915#2122])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-kbl6/igt@kms_flip@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-kbl2/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible@a-dp1:
- shard-kbl: [PASS][20] -> [DMESG-WARN][21] ([i915#1982]) +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-kbl2/igt@kms_flip@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-kbl3/igt@kms_flip@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][22] -> [FAIL][23] ([i915#1188])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl9/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl5/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-apl: [PASS][24] -> [DMESG-WARN][25] ([i915#1635] / [i915#1982]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-apl1/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-apl7/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][26] -> [SKIP][27] ([fdo#109642] / [fdo#111068])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb2/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb6/igt@[email protected]
* igt@kms_psr@psr2_basic:
- shard-iclb: [PASS][28] -> [SKIP][29] ([fdo#109441]) +2 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb2/igt@kms_psr@psr2_basic.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb5/igt@kms_psr@psr2_basic.html
* igt@kms_vblank@pipe-c-wait-busy:
- shard-tglb: [PASS][30] -> [DMESG-WARN][31] ([i915#1982])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb2/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb1/igt@[email protected]
* igt@sysfs_preempt_timeout@timeout@rcs0:
- shard-skl: [PASS][32] -> [FAIL][33] ([i915#2060])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl3/igt@sysfs_preempt_timeout@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl1/igt@sysfs_preempt_timeout@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@preservation-s3@vecs0:
- shard-kbl: [DMESG-WARN][34] ([i915#180]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-kbl1/igt@gem_ctx_isolation@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-kbl7/igt@gem_ctx_isolation@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][36] ([i915#454]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb6/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb8/igt@[email protected]
* igt@i915_selftest@live@execlists:
- shard-skl: [INCOMPLETE][38] ([CI#80]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl2/igt@i915_selftest@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl7/igt@i915_selftest@[email protected]
* {igt@kms_async_flips@test-time-stamp}:
- shard-tglb: [FAIL][40] ([i915#2597]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb8/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb3/igt@[email protected]
* igt@kms_big_fb@x-tiled-16bpp-rotate-180:
- shard-kbl: [DMESG-WARN][42] ([i915#1982]) -> [PASS][43] +2 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-kbl4/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-kbl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-skl: [FAIL][44] ([i915#54]) -> [PASS][45] +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl3/igt@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl9/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-b-64x64-right-edge:
- shard-glk: [DMESG-WARN][46] ([i915#1982]) -> [PASS][47] +3 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-glk2/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-glk1/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-tglb: [FAIL][48] ([i915#2346]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb3/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb8/igt@[email protected]
* igt@kms_flip@flip-vs-blocking-wf-vblank@a-dp1:
- shard-apl: [DMESG-WARN][50] ([i915#1635] / [i915#1982]) -> [PASS][51] +2 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-apl8/igt@kms_flip@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-apl8/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-pgflip-blt:
- shard-tglb: [DMESG-WARN][52] ([i915#1982]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb7/igt@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb1/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][54] ([i915#1188]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl3/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl9/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- shard-hsw: [DMESG-WARN][56] ([i915#1982]) -> [PASS][57] +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-hsw6/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-hsw2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [DMESG-FAIL][58] ([fdo#108145] / [i915#1982]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl3/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [SKIP][60] ([fdo#109441]) -> [PASS][61] +1 similar issue
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb3/igt@kms_psr@psr2_cursor_blt.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
* igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm:
- shard-skl: [DMESG-WARN][62] ([i915#1982]) -> [PASS][63] +2 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl1/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl3/igt@[email protected]
* igt@prime_vgem@coherency-blt:
- shard-tglb: [INCOMPLETE][64] -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb1/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb6/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][66] ([i915#2684]) -> [WARN][67] ([i915#1804] / [i915#2684])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-iclb2/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-iclb6/igt@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-tglb: [INCOMPLETE][68] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#2411] / [i915#456]) -> [DMESG-WARN][69] ([i915#1436] / [i915#1602] / [i915#1887] / [i915#2411]) +1 similar issue
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb7/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb6/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible@a-edp1:
- shard-skl: [DMESG-FAIL][70] ([i915#1982]) -> [DMESG-WARN][71] ([i915#1982])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl3/igt@kms_flip@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl9/igt@kms_flip@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-basic:
- shard-skl: [FAIL][72] ([fdo#108145] / [i915#265]) -> [DMESG-FAIL][73] ([fdo#108145] / [i915#1982])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-skl9/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-skl5/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: [FAIL][74] ([i915#2295]) -> [FAIL][75] ([i915#2295] / [i915#483])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-kbl7/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-kbl4/igt@[email protected]
- shard-glk: ([FAIL][76], [FAIL][77]) ([i915#1814] / [i915#2295] / [i915#483] / [k.org#202321]) -> [FAIL][78] ([i915#2295] / [k.org#202321])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-glk7/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-glk8/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-glk1/igt@[email protected]
- shard-tglb: ([FAIL][79], [FAIL][80], [FAIL][81], [FAIL][82]) ([i915#1602] / [i915#1814] / [i915#2295] / [i915#2426] / [i915#409]) -> ([FAIL][83], [FAIL][84], [FAIL][85]) ([i915#1602] / [i915#1814] / [i915#2295])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb5/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb6/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb1/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9382/shard-tglb7/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb3/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb7/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/shard-tglb6/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1226]: https://gitlab.freedesktop.org/drm/intel/issues/1226
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#1887]: https://gitlab.freedesktop.org/drm/intel/issues/1887
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2060]: https://gitlab.freedesktop.org/drm/intel/issues/2060
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2597]: https://gitlab.freedesktop.org/drm/intel/issues/2597
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#409]: https://gitlab.freedesktop.org/drm/intel/issues/409
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#483]: https://gitlab.freedesktop.org/drm/intel/issues/483
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
Participating hosts (10 -> 11)
------------------------------
Additional (1): pig-snb-2600
Build changes
-------------
* Linux: CI_DRM_9382 -> Patchwork_18963
CI-20190529: 20190529
CI_DRM_9382: ac60f3f3090115d21f028bffa2dcfb67f695c4f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5869: 5236e5d4be3ab5e2fedacc32152120b7fb77bf9f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18963: 3fe494566d7d9e608a50e509ab2ea30f86e1c212 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18963/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Thomas.
Nice clean-up series - quite an effort to move one member to deprecated!
I have read through most of the patches. I left a few notes in my replies but nothing buggy. Just nitpicks.
Quoted 21 lines · Thomas Zimmermann
The pdev field in struct
drm_devicepoints to a PCI device structure and goes back to UMS-only days when all DRM drivers where for PCI devices. Meanwhile we also support USB, SPI and platform devices. Each of those uses the generic device stored in struct drm_device.dev.To reduce duplications and remove the special case of PCI, this patchset converts all modesetting drivers from pdev to dev and makes pdev a field for legacy UMS drivers.
For PCI devices, the pointer in struct drm_device.dev can be upcasted to struct
pci_device; or tested for PCI withdev_is_pci(). In several places the code can use the dev field directly.After converting all drivers and the DRM core, the pdev fields becomes only relevant for legacy drivers. In a later patchset, we may want to convert these as well and remove pdev entirely.
The patchset touches many files, but the individual changes are mostly trivial. I suggest to merge each driver's patch through the respective tree and later the rest through drm-misc-next.
Quoted 13 lines
Thomas Zimmermann (15):
drm/amdgpu: Remove references to struct drm_device.pdev drm/ast: Remove references to struct drm_device.pdev drm/bochs: Remove references to struct drm_device.pdev drm/cirrus: Remove references to struct drm_device.pdev drm/gma500: Remove references to struct drm_device.pdev drm/hibmc: Remove references to struct drm_device.pdev drm/mgag200: Remove references to struct drm_device.pdev drm/qxl: Remove references to struct drm_device.pdev drm/vboxvideo: Remove references to struct drm_device.pdev drm/virtgpu: Remove references to struct drm_device.pdev drm/vmwgfx: Remove references to struct drm_device.pdev
drm: Upcast struct drm_device.dev to structpci_device; replace pdev
All above are:
Quoted 1 line
drm/nouveau: Remove references to struct drm_device.pdev
I lost my confidence in my reading of this code.
Quoted 2 lines
drm/i915: Remove references to struct drm_device.pdev drm/radeon: Remove references to struct drm_device.pdev
I did not look at these at all. I hope someone else find time to do so.
Sam