mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Update color properties on output_get_property
Notify RandR of any updated color properties on the output's CRTC when its get_property() hook is called. v2: Remove per-CRTC check for color management support. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
639acf54b4
commit
29de2859e2
@@ -2125,6 +2125,27 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
|
||||
|
||||
static Bool drmmode_output_get_property(xf86OutputPtr output, Atom property)
|
||||
{
|
||||
drmmode_crtc_private_ptr drmmode_crtc;
|
||||
enum drmmode_cm_prop cm_prop_id;
|
||||
int ret;
|
||||
|
||||
/* First, see if it's a cm property */
|
||||
cm_prop_id = get_cm_enum_from_str(NameForAtom(property));
|
||||
if (output->crtc && cm_prop_id != CM_INVALID_PROP) {
|
||||
drmmode_crtc = output->crtc->driver_private;
|
||||
|
||||
ret = rr_configure_and_change_cm_property(output, drmmode_crtc,
|
||||
cm_prop_id);
|
||||
if (ret) {
|
||||
xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
|
||||
"Error getting color property: %d\n",
|
||||
ret);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Otherwise, must be an output property. */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user