[Intel-xe] [PATCH v11 06/12] drm/xe/pci: wrap probe with mem_access

Matthew Brost matthew.brost at intel.com
Mon Jun 12 18:34:04 UTC 2023


On Mon, Jun 12, 2023 at 06:12:19PM +0100, Matthew Auld wrote:
> Various display init stuff is missing mem_access.ref, so just wrap the
> entire probe sequence with xe_device_mem_access_get(). It's impossible
> for the device to actually be runtime suspened during probe, so this is
> purely just to stop the xe_device_assert_mem_access() from incorrectly
> firing. In a later patch we want to add xe_device_assert_mem_access()
> for all mmio accesses.
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index bd1f59b49928..e1143a6c071d 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -680,7 +680,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (pci_enable_msi(pdev) < 0)
>  		drm_dbg(&xe->drm, "can't enable MSI");
>  
> +	xe_device_mem_access_get(xe);
>  	err = xe_device_probe(xe);
> +	xe_device_mem_access_put(xe);
>  	if (err)
>  		goto err_pci_disable;
>  
> -- 
> 2.40.1
> 


More information about the Intel-xe mailing list