drm: Move struct drm_device.pdev to legacy
Subsystems (16)
Thomas Zimmermann
maintainerv2 cover 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 were 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 duplication 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.
v2:
* move whitespace fixes into separate patches (Alex, Sam)
* move i915 gt/ and gvt/ changes into separate patches (Joonas)
Thomas Zimmermann (20):
drm/amdgpu: Fix trailing whitespaces
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: Fix trailing whitespaces
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/i915/gt: Remove references to struct drm_device.pdev drm/i915/gvt: 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: Fix trailing whitespaces
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 v2 1/20 drm/amdgpu: Fix trailing whitespaces
Adhere to kernel coding style.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
@@ -4922,8 +4922,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 +5014,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)
Signature · 6 lines
2.29.2 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Thomas Zimmermann
maintainerPATCH v2 2/20 drm/amdgpu: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannUsing struct drm_device.pdev is deprecated. Convert amdgpu to struct drm_device.dev. No functional changes.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 ++++++++--------- 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, 22 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +8 -9
@@ -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)) {
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
Thomas Zimmermann
maintainerPATCH v2 3/20 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 v2 4/20 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 v2 5/20 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 v2 6/20 drm/gma500: Fix trailing whitespaces
In reply to Thomas ZimmermannAdhere to kernel coding style.
--- drivers/gpu/drm/gma500/cdv_device.c | 8 ++++---- drivers/gpu/drm/gma500/intel_bios.c | 4 ++-- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_intel_lvds.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/gma500/cdv_device.c +4 -4
@@ -421,16 +421,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 +449,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[] = {
drivers/gpu/drm/gma500/intel_bios.c +2 -2
@@ -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);
drivers/gpu/drm/gma500/oaktrail_device.c +1 -1
@@ -505,7 +505,7 @@ static int oaktrail_chip_setup(struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;int ret; - +if (pci_enable_msi (dev->pdev))dev_warn (dev->dev,"Enabling MSI failed!\n" );
drivers/gpu/drm/gma500/psb_intel_lvds.c +1 -1
@@ -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 );
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH v2 7/20 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 | 22 ++++++++----- 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 | 2 +- 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 | 3 +- 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 | 4 +-- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 36 +++++++++++----------- 23 files changed, 101 insertions(+), 82 deletions(-)
drivers/gpu/drm/gma500/cdv_device.c +15 -7
@@ -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);
@@ -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 +1 -1
@@ -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 +2 -1
@@ -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 +2 -2
@@ -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
Thomas Zimmermann
maintainerPATCH v2 8/20 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 v2 9/20 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.
v2:
* move gt/ and gvt/ changes into separate patches
--- 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/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 +- 32 files changed, 68 insertions(+), 68 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/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;
@@ -1281,7 +1279,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
@@ -4357,7 +4357,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;/*
@@ -4392,7 +4392,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
@@ -4452,5 +4452,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
maintainerPATCH v2 10/20 drm/i915/gt: 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/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 +++--- 5 files changed, 12 insertions(+), 12 deletions(-)
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;
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH v2 11/20 drm/i915/gvt: 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/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 ++-- 5 files changed, 19 insertions(+), 18 deletions(-)
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
@@ -746,7 +746,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);
@@ -831,7 +831,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;
@@ -2402,7 +2402,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,
@@ -2460,7 +2460,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++) {
@@ -2732,7 +2732,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" );
@@ -2781,7 +2781,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);
Signature · 1 line
2.29.2
Thomas Zimmermann
maintainerPATCH v2 12/20 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 v2 13/20 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
Thomas Zimmermann
maintainerPATCH v2 14/20 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 v2 15/20 drm/radeon: Fix trailing whitespaces
In reply to Thomas ZimmermannAdhere to kernel coding style.
--- drivers/gpu/drm/radeon/r100.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/r100.c +1 -1
@@ -2797,7 +2797,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_kms.c +1 -1
@@ -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);
Signature · 6 lines
2.29.2 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Thomas Zimmermann
maintainerPATCH v2 16/20 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 | 25 +++--- 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 | 18 ++-- .../gpu/drm/radeon/radeon_legacy_encoders.c | 6 +- drivers/gpu/drm/radeon/rs780_dpm.c | 7 +- 17 files changed, 142 insertions(+), 139 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 +12 -13
@@ -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 ; }
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 +9 -9
@@ -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
Thomas Zimmermann
maintainerPATCH v2 17/20 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 v2 18/20 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 v2 19/20 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
Thomas Zimmermann
maintainerPATCH v2 20/20 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
@@ -326,7 +326,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 );
@@ -556,7 +556,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 v2 01/20] drm/amdgpu: Fix trailing whitespaces
In reply to Thomas ZimmermannRegards,
Christian.
Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 27 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-2@@ -4922,8 +4922,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 *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) · line 5020
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -5014,7 +5014,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)
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Move struct drm_device.pdev to legacy (rev2)
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy (rev2)
URL : https://patchwork.freedesktop.org/series/84205/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip d5ee9901110c drm/amdgpu: Fix trailing whitespaces 9c9debf682a2 drm/amdgpu: Remove references to struct drm_device.pdev 1be542ae7e18 drm/ast: Remove references to struct drm_device.pdev fa29f8d7b64e drm/bochs: Remove references to struct drm_device.pdev 52f0841c50db drm/cirrus: Remove references to struct drm_device.pdev -:13: WARNING:OBSOLETE: drivers/gpu/drm/tiny/cirrus.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
-:16: 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 d48462ec93e7 drm/gma500: Fix trailing whitespaces cb67b5b224f9 drm/gma500: Remove references to struct drm_device.pdev -:90: CHECK:CAMELCASE: Avoid CamelCase: <saveLBB>
#90: FILE: drivers/gpu/drm/gma500/cdv_device.c:269:
+ pci_read_config_byte(pdev, 0xF4, ®s->cdv.saveLBB);
-:130: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #130: FILE: drivers/gpu/drm/gma500/cdv_intel_crt.c:281:
+ dev_printk(KERN_ERR, dev->dev, "DDC bus registration failed.\n");
-:152: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #152: FILE: drivers/gpu/drm/gma500/cdv_intel_lvds.c:578:
+ dev_printk(KERN_ERR, dev->dev,
-:193: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around dev->mode_config.fb_base #193: FILE: drivers/gpu/drm/gma500/framebuffer.c:545:
+ pci_read_config_dword(pdev, PSB_BSM, (u32 *)&(dev->mode_config.fb_base));
-:664: WARNING:PREFER_DEV_LEVEL: Prefer dev_err(... to dev_printk(KERN_ERR, ... #664: FILE: drivers/gpu/drm/gma500/psb_intel_lvds.c:722:
+ dev_printk(KERN_ERR, dev->dev,
-:693: WARNING:LONG_LINE: line length of 116 exceeds 100 columns #693: 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, 606 lines checkedbe8051e49be4 drm/hibmc: Remove references to struct drm_device.pdev61e0b567bb3e drm/i915: Remove references to struct drm_device.pdevcdd2c801aa8f drm/i915/gt: Remove references to struct drm_device.pdevdbc466d7690b drm/i915/gvt: Remove references to struct drm_device.pdev f53a3b1b9d6f drm/mgag200: Remove references to struct drm_device.pdev4cbb5886974d drm/nouveau: Remove references to struct drm_device.pdeve73c9354acd9 drm/qxl: Remove references to struct drm_device.pdev416d6fc35bdf drm/radeon: Fix trailing whitespaces15c70afcebfd drm/radeon: Remove references to struct drm_device.pdev
-:28: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x71C5' #28: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:28: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x106b' #28: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:28: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0080' #28: FILE: drivers/gpu/drm/radeon/atombios_encoders.c:2068:
+ if ((rdev->pdev->device == 0x71C5) &&
+ (rdev->pdev->subsystem_vendor == 0x106b) &&
+ (rdev->pdev->subsystem_device == 0x0080)) {
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016c' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016d' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016e' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x016f' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0170' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x017d' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x017e' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x0183' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x018a' #70: 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)))
-:70: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x019a' #70: 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)))
-:100: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rdev' - possible side-effects? #100: 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))
-:100: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'rdev' may be better as '(rdev)' to avoid precedence issues #100: 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))
-:123: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rdev' - possible side-effects? #123: 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))
-:123: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'rdev' may be better as '(rdev)' to avoid precedence issues #123: 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))
-:148: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x791e' #148: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:148: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #148: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:148: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x826d' #148: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:297:
+ if ((pdev->device == 0x791e) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x826d)) {
-:160: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7941' #160: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:160: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1849' #160: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:160: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x7941' #160: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:306:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x1849) &&
+ (pdev->subsystem_device == 0x7941)) {
-:172: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x796e' #172: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:172: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1462' #172: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:172: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x7302' #172: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:315:
+ if ((pdev->device == 0x796e) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x7302)) {
-:184: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7941' #184: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:184: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x147b' #184: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:184: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2412' #184: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:324:
+ if ((pdev->device == 0x7941) &&
+ (pdev->subsystem_vendor == 0x147b) &&
+ (pdev->subsystem_device == 0x2412)) {
-:195: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x5653' #195: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:195: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1462' #195: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:195: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x0291' #195: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:332:
+ if ((pdev->device == 0x5653) &&
+ (pdev->subsystem_vendor == 0x1462) &&
+ (pdev->subsystem_device == 0x0291)) {
-:208: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7146' #208: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:208: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x17af' #208: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:208: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2058' #208: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:342:
+ if ((pdev->device == 0x7146) &&
+ (pdev->subsystem_vendor == 0x17af) &&
+ (pdev->subsystem_device == 0x2058)) {
-:219: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x7142' #219: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:219: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1458' #219: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:219: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2134' #219: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:350:
+ if ((pdev->device == 0x7142) &&
+ (pdev->subsystem_vendor == 0x1458) &&
+ (pdev->subsystem_device == 0x2134)) {
-:231: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x71C5' #231: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:231: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x106b' #231: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:231: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x0080' #231: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:359:
+ if ((pdev->device == 0x71C5) &&
+ (pdev->subsystem_vendor == 0x106b) &&
+ (pdev->subsystem_device == 0x0080)) {
-:244: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9598' #244: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:244: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #244: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:244: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01da' #244: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:377:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01da)) {
-:256: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9598' #256: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:256: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #256: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:256: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01e4' #256: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:386:
+ if ((pdev->device == 0x9598) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e4)) {
-:268: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x95C5' #268: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:268: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1043' #268: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:268: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x01e2' #268: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:395:
+ if ((pdev->device == 0x95C5) &&
+ (pdev->subsystem_vendor == 0x1043) &&
+ (pdev->subsystem_device == 0x01e2)) {
-:281: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x95c4' #281: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:281: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9591' #281: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:281: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1025' #281: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:281: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x013c' #281: FILE: drivers/gpu/drm/radeon/radeon_atombios.c:422:
+ if (((pdev->device == 0x95c4) || (pdev->device == 0x9591)) &&
+ (pdev->subsystem_vendor == 0x1025) &&
+ (pdev->subsystem_device == 0x013c)) {
-:294: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9498' #294: 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))) {
-:294: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1682' #294: 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))) {
-:294: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x2452' #294: 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))) {
-:294: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'i2c_bus->valid == false' #294: 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))) {
-:309: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9802' #309: 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)) {
-:309: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9805' #309: 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)) {
-:309: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->device == 0x9806' #309: 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)) {
-:309: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_vendor == 0x1734' #309: 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)) {
-:309: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pdev->subsystem_device == 0x11bd' #309: 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)) {
-:326: WARNING:BRACES: braces {} are not necessary for single statement blocks #326: 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);
}
-:335: WARNING:BRACES: braces {} are not necessary for single statement blocks #335: 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));
}
-:344: WARNING:BRACES: braces {} are not necessary for single statement blocks #344: 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);
}
-:359: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x5159' #359: 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))) {
-:359: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x174B' #359: 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))) {
-:359: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_device == 0x7c28' #359: 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))) {
-:359: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->device == 0x514D' #359: 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))) {
-:359: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'rdev->pdev->subsystem_vendor == 0x174B' #359: 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))) {
-:359: CHECK:UNNECESSARY_PARENTHESES: Unneces
_______________________________________________
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 (rev2)
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy (rev2)
URL : https://patchwork.freedesktop.org/series/84205/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9412 -> Patchwork_19024
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/index.html
New tests
---------
New tests have been introduced between CI_DRM_9412 and Patchwork_19024:
### New CI tests (1) ###
* boot:
- Statuses : 1 fail(s) 40 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_19024 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload:
- fi-icl-u2: [PASS][1] -> [DMESG-WARN][2] ([i915#1982]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-icl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-icl-u2/igt@[email protected]
- fi-tgl-y: [PASS][3] -> [DMESG-WARN][4] ([i915#1982] / [k.org#205379])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-tgl-y/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-byt-j1900: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-byt-j1900/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-byt-j1900/igt@[email protected]
* igt@kms_busy@basic@flip:
- fi-kbl-soraka: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-kbl-soraka/igt@kms_busy@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-kbl-soraka/igt@kms_busy@[email protected]
* igt@prime_vgem@basic-fence-flip:
- fi-tgl-y: [PASS][9] -> [DMESG-WARN][10] ([i915#402]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-tgl-y/igt@[email protected]
#### Possible fixes ####
* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-tgl-u2/igt@[email protected]
* igt@i915_module_load@reload:
- fi-byt-j1900: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-byt-j1900/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-byt-j1900/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-n3050: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-bsw-n3050/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-bsw-n3050/igt@[email protected]
* igt@i915_selftest@live@client:
- fi-glk-dsi: [INCOMPLETE][17] ([i915#2295]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-glk-dsi/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-glk-dsi/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-snb-2520m: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-snb-2520m/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-snb-2520m/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- fi-icl-u2: [DMESG-WARN][21] ([i915#1982]) -> [PASS][22] +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-icl-u2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/fi-icl-u2/igt@[email protected]
* igt@vgem_basic@dmabuf-export:
- fi-tgl-y: [DMESG-WARN][23] ([i915#402]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/fi-tgl-y/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/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#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379
Participating hosts (45 -> 41)
------------------------------
Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_9412 -> Patchwork_19024
CI-20190529: 20190529
CI_DRM_9412: 62a57fc697819341ffabadc2b734f2288fdf19ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5877: c36f7973d1ee7886ec65fa16c7b1fd8dc5a33caa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19024: 3ac61c3965f9f628dabaa4eb078b440af0bbca05 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
3ac61c3965f9 drm: Upcast struct drm_device.dev to struct pci_device; replace pdev 06e88f740137 drm/vmwgfx: Remove references to struct drm_device.pdev c2c3dd264cfb drm/virtgpu: Remove references to struct drm_device.pdev 6054c043c7f6 drm/vboxvideo: Remove references to struct drm_device.pdev 15c70afcebfd drm/radeon: Remove references to struct drm_device.pdev 416d6fc35bdf drm/radeon: Fix trailing whitespacese73c9354acd9 drm/qxl: Remove references to struct drm_device.pdev 4cbb5886974d drm/nouveau: Remove references to struct drm_device.pdev f53a3b1b9d6f drm/mgag200: Remove references to struct drm_device.pdev dbc466d7690b drm/i915/gvt: Remove references to struct drm_device.pdev cdd2c801aa8f drm/i915/gt: Remove references to struct drm_device.pdev 61e0b567bb3e drm/i915: Remove references to struct drm_device.pdev be8051e49be4 drm/hibmc: Remove references to struct drm_device.pdev cb67b5b224f9 drm/gma500: Remove references to struct drm_device.pdev d48462ec93e7 drm/gma500: Fix trailing whitespaces52f0841c50db drm/cirrus: Remove references to struct drm_device.pdev fa29f8d7b64e drm/bochs: Remove references to struct drm_device.pdev 1be542ae7e18 drm/ast: Remove references to struct drm_device.pdev 9c9debf682a2 drm/amdgpu: Remove references to struct drm_device.pdev d5ee9901110c drm/amdgpu: Fix trailing whitespaces
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Move struct drm_device.pdev to legacy (rev2)
In reply to Thomas Zimmermann== Series Details ==
== Series Details ==
Series: drm: Move struct drm_device.pdev to legacy (rev2)
URL : https://patchwork.freedesktop.org/series/84205/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9412_full -> Patchwork_19024_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
New tests
---------
New tests have been introduced between CI_DRM_9412_full and Patchwork_19024_full:
### New CI tests (1) ###
* boot:
- Statuses : 175 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_19024_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_reloc@basic-many-active@rcs0:
- shard-apl: [PASS][1] -> [FAIL][2] ([i915#2389])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl1/igt@gem_exec_reloc@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-apl3/igt@gem_exec_reloc@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][3] -> [FAIL][4] ([i915#454])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb4/igt@[email protected]
* igt@kms_big_fb@yf-tiled-32bpp-rotate-0:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-apl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-128x42-sliding:
- shard-skl: [PASS][7] -> [FAIL][8] ([i915#54]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-apl: [PASS][9] -> [FAIL][10] ([i915#54])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-apl3/igt@[email protected]
- shard-kbl: [PASS][11] -> [FAIL][12] ([i915#54])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-kbl7/igt@[email protected]
* igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible@a-dp1:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#1982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl4/igt@kms_flip@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-kbl6/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
- shard-skl: [PASS][15] -> [FAIL][16] ([i915#2122])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl6/igt@kms_flip@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl1/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@b-dp1:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#180])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl1/igt@kms_flip@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-kbl2/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@b-edp1:
- shard-skl: [PASS][19] -> [INCOMPLETE][20] ([i915#198])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl3/igt@kms_flip@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl9/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-tglb: [PASS][21] -> [DMESG-WARN][22] ([i915#1982]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-tglb3/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-gtt:
- shard-iclb: [PASS][23] -> [DMESG-WARN][24] ([i915#1982])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb8/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][25] -> [FAIL][26] ([i915#1188])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl10/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl10/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-skl: [PASS][27] -> [INCOMPLETE][28] ([i915#648])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl10/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl10/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109642] / [fdo#111068])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb1/igt@[email protected]
* igt@kms_psr@cursor_mmap_cpu:
- shard-skl: [PASS][31] -> [DMESG-WARN][32] ([i915#1982]) +7 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl2/igt@kms_psr@cursor_mmap_cpu.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl4/igt@kms_psr@cursor_mmap_cpu.html
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109441]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb8/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@perf@polling-parameterized:
- shard-iclb: [PASS][35] -> [FAIL][36] ([i915#1542])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb1/igt@[email protected]
#### Possible fixes ####
* igt@drm_read@fault-buffer:
- shard-glk: [DMESG-WARN][37] ([i915#1982]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk5/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk1/igt@[email protected]
* igt@i915_module_load@reload:
- shard-skl: [DMESG-WARN][39] ([i915#1982]) -> [PASS][40] +5 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl9/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl8/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- shard-glk: [DMESG-FAIL][41] ([i915#2291]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk4/igt@i915_selftest@live@gt_heartbeat.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk8/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_suspend@debugfs-reader:
- shard-kbl: [DMESG-WARN][43] ([i915#180]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl3/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-kbl7/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding:
- shard-skl: [FAIL][45] ([i915#54]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl6/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-c-128x128-top-edge:
- shard-apl: [DMESG-WARN][47] ([i915#1982]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-apl7/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- shard-kbl: [DMESG-WARN][49] ([i915#1982]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-kbl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-kbl3/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-glk: [FAIL][51] ([i915#2346]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk5/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk1/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
- shard-tglb: [FAIL][53] ([i915#2346]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-tglb7/igt@[email protected]
* igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions:
- shard-iclb: [DMESG-WARN][55] ([i915#1982]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb7/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb3/igt@kms_cursor_legacy@short-flip-after-cursor-atomic-transitions.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-edp1:
- shard-tglb: [FAIL][57] ([i915#2598]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb7/igt@kms_flip@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-tglb6/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt:
- shard-tglb: [DMESG-WARN][59] ([i915#1982]) -> [PASS][60] +2 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-tglb5/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-tglb5/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][61] ([i915#1188]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl8/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][63] ([fdo#108145] / [i915#265]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl7/igt@[email protected]
* igt@kms_psr2_su@page_flip:
- shard-iclb: [SKIP][65] ([fdo#109642] / [fdo#111068]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb4/igt@kms_psr2_su@page_flip.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb2/igt@kms_psr2_su@page_flip.html
* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb8/igt@kms_psr@psr2_cursor_mmap_gtt.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
* igt@perf_pmu@module-unload:
- shard-skl: [DMESG-WARN][69] ([i915#1982] / [i915#262]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl9/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl8/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-fence:
- shard-iclb: [WARN][71] ([i915#2681] / [i915#2684]) -> [WARN][72] ([i915#2684])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb8/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb5/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][73] ([i915#2684]) -> [WARN][74] ([i915#2681] / [i915#2684])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-iclb2/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-iclb8/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-legacy:
- shard-skl: [FAIL][75] ([i915#2346]) -> [DMESG-FAIL][76] ([i915#1982])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl10/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [INCOMPLETE][77] ([i915#2295] / [i915#2635]) -> [DMESG-WARN][78] ([i915#2635] / [i915#295])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-apl7/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-apl4/igt@[email protected]
* igt@runner@aborted:
- shard-glk: ([FAIL][79], [FAIL][80], [FAIL][81]) ([i915#1814] / [i915#2295] / [i915#2426] / [i915#2722] / [k.org#202321]) -> ([FAIL][82], [FAIL][83], [FAIL][84]) ([i915#1814] / [i915#2295] / [i915#2426] / [i915#2722] / [i915#483] / [k.org#202321])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk5/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk8/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-glk4/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk7/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk4/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-glk1/igt@[email protected]
- shard-skl: [FAIL][85] ([i915#2295] / [i915#2722]) -> ([FAIL][86], [FAIL][87]) ([i915#1436] / [i915#2295] / [i915#2426] / [i915#2722] / [i915#483])
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9412/shard-skl1/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl5/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19024/shard-skl7/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[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#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
[i915#2295]: https://gitlab.freedesktop.org/drm/intel/issues/2295
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2598]: https://gitlab.freedesktop.org/drm/intel/issues/2598
[i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262
[i915#2635]: https://gitlab.freedesktop.org/drm/intel/issues/2635
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#483]: https://gitlab.freedesktop.org/drm/intel/issues/483
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[k.org#202321]: https://bugzilla.kernel.org/show_bug.cgi?id=202321
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_9412 -> Patchwork_19024
CI-20190529: 20190529
CI_DRM_9412: 62a57fc697819341ffabadc2b734f2288fdf19ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5877: c36f7973d1ee7886ec65fa16c7b1fd8dc5a33caa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19024: 3ac61c3965f9f628dabaa4eb078b440af0bbca05 @ 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_19024/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 08/20] drm/hibmc: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 88 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert hibmc to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Xinliang Liu <[email protected]>Cc Tian Tao <[email protected]>Cc John Stultz <[email protected]>Cc Xinwei Kong <[email protected]>Cc Chen Feng <[email protected]>--- 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 +0
-0@@ -26,9 +26,9 @@ int hibmc_mm_init(struct hibmc_drm_private *hibmc)struct drm_vram_mm *vmm;
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c int hibmc_mm_init(struct hibmc_drm_private *hibmc) · line 34
Quoted 10 lines
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c +2
-2int 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);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thomas Zimmermann
maintainerRe: [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces
In reply to Christian KönigHi
Am 01.12.20 um 11:40 schrieb Christian König:
Quoted 3 lines
Could you add these patches to the AMD tree?
Best regards
Thomas
Quoted 42 lines
Regards,
Christian.Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 36 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -4922,8 +4922,8 @@ pci_ers_result_tamdgpu_pci_error_detected(struct
pci_dev*pdev,pci_channel_stacasepci_channel_io_normal:
returnPCI_ERS_RESULT_CAN_RECOVER;
/* Fatal error, prepare for slot reset */
- casepci_channel_io_frozen:
- /*
+ casepci_channel_io_frozen:
+ /*
* Cancel and wait for all TDRs in progress if failing to
* setadev->in_gpu_resetinamdgpu_device_lock_adev*drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -5014,7 +5014,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)
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 v2 04/20] drm/bochs: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert bochs to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Gerd Hoffmann <[email protected]>
Quoted 42 lines
--- 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
Re: [PATCH v2 05/20] drm/cirrus: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert cirrus to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Gerd Hoffmann <[email protected]>
Re: [PATCH v2 14/20] drm/qxl: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert qxl to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Gerd Hoffmann <[email protected]>
Re: [PATCH v2 18/20] drm/virtgpu: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert virtgpu to struct drm_device.dev. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Gerd Hoffmann <[email protected]>
Christian König
maintainerRe: [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces
In reply to Thomas ZimmermannAm 02.12.20 um 08:59 schrieb Thomas Zimmermann:
Quoted 8 lines
Hi
Am 01.12.20 um 11:40 schrieb Christian König:
Quoted 3 lines
Could you add these patches to the AMD tree?
Alex is usually the one who picks such stuff up.
But when people send out patch sets which mix changes from different drivers it is more common to push them through drm-misc-next.
Regards,
Christian.
Quoted 47 lines
Best regards
ThomasQuoted 42 lines
Regards,
Christian.Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 36 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -4922,8 +4922,8 @@ pci_ers_result_tamdgpu_pci_error_detected(struct
pci_dev*pdev,pci_channel_stacasepci_channel_io_normal:
returnPCI_ERS_RESULT_CAN_RECOVER;
/* Fatal error, prepare for slot reset */
- casepci_channel_io_frozen:
- /*
+ casepci_channel_io_frozen:
+ /*
* Cancel and wait for all TDRs in progress if failing to
* setadev->in_gpu_resetinamdgpu_device_lock_adev*drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -5014,7 +5014,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)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Thomas Zimmermann
maintainerRe: [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces
Hi
Am 02.12.20 um 09:43 schrieb Christian König:
Quoted 6 lines
Am 02.12.20 um 08:59 schrieb Thomas Zimmermann:
Quoted 5 lines
Hi
Am 01.12.20 um 11:40 schrieb Christian König:
Quoted 2 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Could you add these patches to the AMD tree?
Alex is usually the one who picks such stuff up.
But when people send out patch sets which mix changes from different drivers it is more common to push them through drm-misc-next.
I'm OK with drm-misc-next. I just don't want to add too many merge conflicts in your side.
Best regards
Thomas
Quoted 52 lines
Regards,
Christian.Quoted 47 lines
Best regards
ThomasQuoted 42 lines
Regards,
Christian.Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 36 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -4922,8 +4922,8 @@ pci_ers_result_tamdgpu_pci_error_detected(struct
pci_dev*pdev,pci_channel_stacasepci_channel_io_normal:
returnPCI_ERS_RESULT_CAN_RECOVER;
/* Fatal error, prepare for slot reset */
- casepci_channel_io_frozen:
- /*
+ casepci_channel_io_frozen:
+ /*
* Cancel and wait for all TDRs in progress if failing to
* setadev->in_gpu_resetinamdgpu_device_lock_adev*drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -5014,7 +5014,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)
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
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces
Quoted 16 lines · Thomas Zimmermann
Hi
Am 02.12.20 um 09:43 schrieb Christian König:
Quoted 12 lines
Am 02.12.20 um 08:59 schrieb Thomas Zimmermann:
Quoted 10 lines
Hi
Am 01.12.20 um 11:40 schrieb Christian König:
Quoted 5 lines
Reviewed-by Christian König <[email protected]> on patch #1and #15.
#16.
Could you add these patches to the AMD tree?
Quoted 7 lines
Quoted 4 lines
Alex is usually the one who picks such stuff up.
But when people send out patch sets which mix changes from different drivers it is more common to push them through drm-misc-next.
I'm OK with drm-misc-next. I just don't want to add too many merge conflicts in your side.
Yeah, it doesn't matter to me. I assumed you wanted to land this whole series so you could move forward with further cleanups. If we merge via different trees, you'll have to wait for all of this to come together again in drm-next.
Alex
Quoted 66 lines
Best regards
ThomasQuoted 53 lines
Regards,
Christian.Quoted 48 lines
Best regards
ThomasQuoted 43 lines
Regards,
Christian.Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 37 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -4922,8 +4922,8 @@ pci_ers_result_tamdgpu_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 */drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-3-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 +5014,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)--
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
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
maintainerRe: [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces
Hi
Am 02.12.20 um 15:02 schrieb Alex Deucher:
Quoted 22 lines · Thomas Zimmermann
Quoted 21 lines
Hi
Am 02.12.20 um 09:43 schrieb Christian König:
Quoted 16 lines
Am 02.12.20 um 08:59 schrieb Thomas Zimmermann:
Quoted 10 lines
Hi
Am 01.12.20 um 11:40 schrieb Christian König:
Quoted 5 lines
Reviewed-by Christian König <[email protected]> on patch #1and #15.
#16.
Could you add these patches to the AMD tree?
Alex is usually the one who picks such stuff up.
But when people send out patch sets which mix changes from different drivers it is more common to push them through drm-misc-next.
Quoted 7 lines
Quoted 2 lines
I'm OK with drm-misc-next. I just don't want to add too many merge conflicts in your side.
Yeah, it doesn't matter to me. I assumed you wanted to land this whole series so you could move forward with further cleanups. If we merge via different trees, you'll have to wait for all of this to come together again in drm-next.
OK, sure. I'll merge it through drm-misc-next.
Best regards
Thomas
Quoted 79 lines
Alex
Quoted 66 lines
Best regards
ThomasQuoted 53 lines
Regards,
Christian.Quoted 48 lines
Best regards
ThomasQuoted 43 lines
Regards,
Christian.Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 37 lines
Adhere to kernel coding style.
Signed-off-by Thomas Zimmermann <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Sam Ravnborg <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -4922,8 +4922,8 @@ pci_ers_result_tamdgpu_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 */drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-3-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 +5014,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)--
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örfferQuoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
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
maintainerRe: [PATCH v2 09/20] drm/i915: Remove references to struct drm_device.pdev
In reply to Thomas Zimmermannping for a review of the i915 patches
Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 777 lines
Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes.
v2:
* move gt/ and gvt/ changes into separate patchesSigned-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]>--- 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/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 +- 32 files changed, 68 insertions(+), 68 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/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;@@ -1281,7 +1279,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@@ -4357,7 +4357,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;/* @@ -4392,7 +4392,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 @@ -4452,5 +4452,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 · 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
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Thomas Zimmermann
maintainerRe: [PATCH v2 13/20] drm/nouveau: Remove references to struct drm_device.pdev
In reply to Thomas Zimmermannping for a review of the nouveau patch
Am 01.12.20 um 11:35 schrieb Thomas Zimmermann:
Quoted 387 lines
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]>--- 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 · 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
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v2 13/20] drm/nouveau: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannHi,
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]>
Quoted 13 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(-)
I believe there's a use of drm_device.pdev indrivers/gpu/drm/nouveau/dispnv04/dfp.c in thenv04_dfp_update_backlight() function.
Other than that, this looks good to me.
Quoted 376 lines
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 · 6 lines
2.29.2 _______________________________________________ intel-gvt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
Thomas Zimmermann
maintainerRe: [PATCH v2 13/20] drm/nouveau: Remove references to struct drm_device.pdev
Hi
Am 09.12.20 um 19:04 schrieb Jeremy Cline:
Quoted 22 lines
Hi,
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]>Quoted 13 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(-)
Quoted 3 lines
I believe there's a use of drm_device.pdev in
drivers/gpu/drm/nouveau/dispnv04/dfp.cin thenv04_dfp_update_backlight()function.
Oh, I see! It's PowerPC-only.
Quoted 2 lines
Other than that, this looks good to me.
With the forgotten pdev fixes, can I count this as an Acked-by?
Best regards
Thomas
Quoted 383 lines
Quoted 377 lines
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 · 6 lines
2.29.2 _______________________________________________ intel-gvt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev_______________________________________________
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
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH v2 09/20] drm/i915: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 1 line · Thomas Zimmermann
ping for a review of the i915 patches
What did you have in mind regarding merging the series? Should we just pick the patches up?
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Thomas Zimmermann
maintainerRe: [PATCH v2 09/20] drm/i915: Remove references to struct drm_device.pdev
Hi
Am 10.12.20 um 10:03 schrieb Jani Nikula:
Quoted 5 lines · Thomas Zimmermann
Quoted 1 line
ping for a review of the i915 patches
What did you have in mind regarding merging the series? Should we just pick the patches up?
Originally I thought that individual trees would merge their rsp patches. I guess the larger drivers could get some minor conflicts.
Amdgpu/radeon devs suggested to put everything into drm-misc-next at once. I'd prefer that, but ultimately it's up to you.
Best regards
Thomas
Quoted 4 lines
BR,
Jani.
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
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Jeremy Cline
Reviewed-byRe: [PATCH v2 13/20] drm/nouveau: Remove references to struct drm_device.pdev
In reply to Thomas ZimmermannQuoted 29 lines · Thomas Zimmermann
Hi
Am 09.12.20 um 19:04 schrieb Jeremy Cline:
Quoted 22 lines
Hi,
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]>Quoted 13 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(-)Quoted 3 lines
I believe there's a use of drm_device.pdev in
drivers/gpu/drm/nouveau/dispnv04/dfp.cin thenv04_dfp_update_backlight()function.
Quoted 7 lines
Oh, I see! It's PowerPC-only.
Quoted 2 lines
Other than that, this looks good to me.
With the forgotten pdev fixes, can I count this as an Acked-by?
Yeah, with that fix:
Quoted 339 lines
Best regards
ThomasQuoted 336 lines
Quoted 336 lines
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
Quoted 20 lines
Quoted 11 lines
Quoted 5 lines
_______________________________________________
intel-gvt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 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