mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-17 05:18:16 +02:00
drm-backend: Set VRR_ENABLED property based on output configuration
Set up the VRR_ENABLED instead of always clearing it to 0. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
c321cc3020
commit
85d1ca7fab
2 changed files with 15 additions and 1 deletions
|
|
@ -732,6 +732,8 @@ struct weston_output {
|
|||
* mirror-of key in [output] section.
|
||||
*/
|
||||
struct weston_output *mirror_of;
|
||||
|
||||
enum weston_vrr_mode vrr_mode;
|
||||
};
|
||||
|
||||
enum weston_pointer_motion_mask {
|
||||
|
|
|
|||
|
|
@ -429,6 +429,17 @@ drm_rotation_from_output_transform(struct drm_plane *plane,
|
|||
return out;
|
||||
}
|
||||
|
||||
static int
|
||||
wdrm_vrr_enabled_from_output(struct drm_output *drm_output)
|
||||
{
|
||||
struct weston_output *output = &drm_output->base;
|
||||
|
||||
if (output->vrr_mode == WESTON_VRR_MODE_GAME)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache DRM property values
|
||||
*
|
||||
|
|
@ -1352,7 +1363,8 @@ drm_output_apply_state_atomic(struct drm_output_state *state,
|
|||
WDRM_CRTC_DEGAMMA_LUT, 0);
|
||||
}
|
||||
ret |= crtc_add_prop_zero_ok(req, crtc, WDRM_CRTC_CTM, 0);
|
||||
ret |= crtc_add_prop_zero_ok(req, crtc, WDRM_CRTC_VRR_ENABLED, 0);
|
||||
ret |= crtc_add_prop_zero_ok(req, crtc, WDRM_CRTC_VRR_ENABLED,
|
||||
wdrm_vrr_enabled_from_output(output));
|
||||
|
||||
/* No need for the DPMS property, since it is implicit in
|
||||
* routing and CRTC activity. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue