drm/amdgpu/virt: fix handling of the atomic flag
Subsystems (2)
PATCH 1/1 drm/amdgpu/virt: fix handling of the atomic flag
Use the per device drm driver feature flags rather than the global one. This way we can make the drm driver struct const.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +3 -1
@@ -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 ; }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Alex Deucher
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 <[email protected]>
Yeah, that's a good change.
Regards,
Luben
Quoted 14 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1
-0@@ -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);
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev) · line 59
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2
-1+/* 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 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Alex Deucher
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 <[email protected]>
Can we merge this through drm-misc-next so I can follow up with the drm_device constification series there? Otherwise I need to sit on that for another few weeks until all the backmerges are done. -Daniel
Quoted 26 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +3
-1@@ -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 ; }Signature · 1 line
2.25.4
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Daniel Vetter
Quoted 3 lines · Alex Deucher
Use the per device drm driver feature flags rather than the global one. This way we can make the drm driver struct const.
Quoted 7 lines
Quoted 1 line
Signed-off-by Alex Deucher <[email protected]>Reviewed-by Daniel Vetter <[email protected]>Can we merge this through drm-misc-next so I can follow up with the
drm_deviceconstification series there? Otherwise I need to sit on that for another few weeks until all the backmerges are done.
Sure feel free to add it to your series and merge it with the rest, or I can merge it now.
Alex
Quoted 25 lines
-Daniel
Quoted 23 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +3
-1@@ -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 ; }
Quoted 8 lines
Quoted 3 lines
--
2.25.4--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx