diff mbox series

[for,5.10.y-cip] drm/amdgpu/virt: fix handling of the atomic flag

Message ID 1718935080-25727-1-git-send-email-nobuhiro1.iwamatsu@toshiba.co.jp (mailing list archive)
State New
Headers show
Series [for,5.10.y-cip] drm/amdgpu/virt: fix handling of the atomic flag | expand

Commit Message

Nobuhiro Iwamatsu June 21, 2024, 1:58 a.m. UTC
From: Alex Deucher <alexdeucher@gmail.com>

commit e431eb8089eef1477082d6ae072ac252699b231f upstream.

Use the per device drm driver feature flags rather than the
global one.  This way we can make the drm driver struct const.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-3-daniel.vetter@ffwll.ch
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406210812.Au5U3OkG-lkp@intel.com/
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Biju Das June 21, 2024, 6:50 a.m. UTC | #1
Hi Nobuhiro Iwamatsu,

Thanks for the patch.

> -----Original Message-----
> From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> Sent: Friday, June 21, 2024 2:58 AM
> Subject: [PATCH for 5.10.y-cip] drm/amdgpu/virt: fix handling of the atomic flag
> 
> From: Alex Deucher <alexdeucher@gmail.com>
> 
> commit e431eb8089eef1477082d6ae072ac252699b231f upstream.
> 
> Use the per device drm driver feature flags rather than the global one.  This way we can make the
> drm driver struct const.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-3-daniel.vetter@ffwll.ch
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202406210812.Au5U3OkG-lkp@intel.com/
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>

I guess this issue is introduced due to [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/commit/?h=linux-5.10.y-cip&id=2a78ff0b0ab60ac2fb3cc6ea6b4895e2a7e7e769

Cheers,
Biju

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index d6f295103595..a95ada001b0c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -47,11 +47,13 @@ bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev)
> 
>  void amdgpu_virt_init_setting(struct amdgpu_device *adev)  {
> +	struct drm_device *ddev = adev_to_drm(adev);
> +
>  	/* enable virtual display */
>  	if (adev->mode_info.num_crtc == 0)
>  		adev->mode_info.num_crtc = 1;
>  	adev->enable_virtual_display = true;
> -	adev_to_drm(adev)->driver->driver_features &= ~DRIVER_ATOMIC;
> +	ddev->driver_features &= ~DRIVER_ATOMIC;
>  	adev->cg_flags = 0;
>  	adev->pg_flags = 0;
>  }
> --
> 2.43.0
>
Nobuhiro Iwamatsu June 25, 2024, 9:06 a.m. UTC | #2
Hi Biju,

> -----Original Message-----
> From: Biju Das <biju.das.jz@bp.renesas.com>
> Sent: Friday, June 21, 2024 3:51 PM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>; cip-dev@lists.cip-project.org
> Cc: Pavel Machek <pavel@denx.de>
> Subject: RE: [PATCH for 5.10.y-cip] drm/amdgpu/virt: fix handling of the
> atomic flag
> 
> Hi Nobuhiro Iwamatsu,
> 
> Thanks for the patch.
> 
> > -----Original Message-----
> > From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > Sent: Friday, June 21, 2024 2:58 AM
> > Subject: [PATCH for 5.10.y-cip] drm/amdgpu/virt: fix handling of the
> > atomic flag
> >
> > From: Alex Deucher <alexdeucher@gmail.com>
> >
> > commit e431eb8089eef1477082d6ae072ac252699b231f upstream.
> >
> > Use the per device drm driver feature flags rather than the global
> > one.  This way we can make the drm driver struct const.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Link:
> >
> https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-3
> > -daniel.vetter@ffwll.ch
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes:
> > https://lore.kernel.org/oe-kbuild-all/202406210812.Au5U3OkG-lkp@intel.
> > com/
> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> 
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> 
> I guess this issue is introduced due to [1]
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git/commit/?h
> =linux-5.10.y-cip&id=2a78ff0b0ab60ac2fb3cc6ea6b4895e2a7e7e769
> 

Thanks for your review, applied.

Best regards,
  Nobuhiro
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index d6f295103595..a95ada001b0c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -47,11 +47,13 @@  bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev)
 
 void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 {
+	struct drm_device *ddev = adev_to_drm(adev);
+
 	/* enable virtual display */
 	if (adev->mode_info.num_crtc == 0)
 		adev->mode_info.num_crtc = 1;
 	adev->enable_virtual_display = true;
-	adev_to_drm(adev)->driver->driver_features &= ~DRIVER_ATOMIC;
+	ddev->driver_features &= ~DRIVER_ATOMIC;
 	adev->cg_flags = 0;
 	adev->pg_flags = 0;
 }