summaryrefslogtreecommitdiff
path: root/hw/xfree86/drivers/modesetting/drmmode_display.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2019-10-24 13:41:39 -0700
committerAaron Plattner <aplattner@nvidia.com>2020-10-29 15:10:16 -0700
commitb6985d6b3fb3e9ae36f638b0fd65cfad3d4bbd46 (patch)
tree698eeaa49f406d5657e14473502322f8894ca3e3 /hw/xfree86/drivers/modesetting/drmmode_display.c
parent4fefe73feaee31a992b284963599d63feb598807 (diff)
modesetting: Query properties even in non-atomic mode
Modeset properties can be set even when ms->atomic_modeset is disabled by using the drmModeObjectSetProperty() function. This will be necessary in a later change in order to set the GAMMA_LUT and CTM properties. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'hw/xfree86/drivers/modesetting/drmmode_display.c')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 39e7385c7..1791bc87a 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2262,7 +2262,6 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
xf86CrtcPtr crtc;
drmmode_crtc_private_ptr drmmode_crtc;
modesettingEntPtr ms_ent = ms_ent_priv(pScrn);
- modesettingPtr ms = modesettingPTR(pScrn);
drmModeObjectPropertiesPtr props;
static const drmmode_prop_info_rec crtc_props[] = {
[DRMMODE_CRTC_ACTIVE] = { .name = "ACTIVE" },
@@ -2280,21 +2279,19 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
drmmode_crtc->vblank_pipe = drmmode_crtc_vblank_pipe(num);
xorg_list_init(&drmmode_crtc->mode_list);
- if (ms->atomic_modeset) {
- props = drmModeObjectGetProperties(drmmode->fd, mode_res->crtcs[num],
- DRM_MODE_OBJECT_CRTC);
- if (!props || !drmmode_prop_info_copy(drmmode_crtc->props, crtc_props,
- DRMMODE_CRTC__COUNT, 0)) {
- xf86CrtcDestroy(crtc);
- return 0;
- }
-
- drmmode_prop_info_update(drmmode, drmmode_crtc->props,
- DRMMODE_CRTC__COUNT, props);
- drmModeFreeObjectProperties(props);
- drmmode_crtc_create_planes(crtc, num);
+ props = drmModeObjectGetProperties(drmmode->fd, mode_res->crtcs[num],
+ DRM_MODE_OBJECT_CRTC);
+ if (!props || !drmmode_prop_info_copy(drmmode_crtc->props, crtc_props,
+ DRMMODE_CRTC__COUNT, 0)) {
+ xf86CrtcDestroy(crtc);
+ return 0;
}
+ drmmode_prop_info_update(drmmode, drmmode_crtc->props,
+ DRMMODE_CRTC__COUNT, props);
+ drmModeFreeObjectProperties(props);
+ drmmode_crtc_create_planes(crtc, num);
+
/* Hide any cursors which may be active from previous users */
drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0);