From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Luben Tuikov <luben.tuikov@amd.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 3/6] drm/amdgpu/virt: fix handling of the atomic flag
Date: Wed, 4 Nov 2020 11:04:22 +0100 [thread overview]
Message-ID: <20201104100425.1922351-3-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20201104100425.1922351-1-daniel.vetter@ffwll.ch>
From: Alex Deucher <alexdeucher@gmail.com>
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>
---
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 d0aea5e39531..8aff6ef50f91 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.28.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-11-04 10:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 10:04 [PATCH 1/6] drm/radeon: Stop changing the drm_driver struct Daniel Vetter
2020-11-04 10:04 ` Daniel Vetter
2020-11-04 10:04 ` [PATCH 2/6] drm: Compile out legacy chunks from struct drm_device Daniel Vetter
2020-11-04 10:04 ` Daniel Vetter [this message]
2020-11-04 10:04 ` [PATCH 4/6] drm: Allow const struct drm_driver Daniel Vetter
[not found] ` <20201104100425.1922351-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2020-11-04 10:04 ` [PATCH 5/6] drm/<drivers>: Constify " Daniel Vetter
2020-11-04 10:04 ` Daniel Vetter
2020-11-04 10:04 ` Daniel Vetter
2020-11-04 10:04 ` [PATCH 6/6] drm/amdgpu: Make struct drm_driver const Daniel Vetter
2020-11-05 15:36 ` Daniel Vetter
2020-11-06 4:02 ` Luben Tuikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104100425.1922351-3-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=alexander.deucher@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=luben.tuikov@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.