Make drmmode_cm_enabled an inline function

So that it can be used outside of drmmode_display.c as well.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
This commit is contained in:
Michel Dänzer
2019-03-01 17:47:24 +01:00
committed by Michel Dänzer
parent 72653455e4
commit 2798244be7
2 changed files with 9 additions and 8 deletions

View File

@@ -826,14 +826,6 @@ static enum drmmode_cm_prop get_cm_enum_from_str(const char *prop_name)
return CM_INVALID_PROP;
}
/**
* Return TRUE if kernel supports non-legacy color management.
*/
static Bool drmmode_cm_enabled(drmmode_ptr drmmode)
{
return drmmode->cm_prop_ids[CM_GAMMA_LUT_SIZE] != 0;
}
/**
* If legacy LUT is a, and non-legacy LUT is b, then the result of b(a(x)) is
* returned in out_lut. out_lut's length is expected to be the same as the

View File

@@ -182,6 +182,15 @@ enum drmmode_flip_sync {
};
/**
* Return TRUE if kernel supports non-legacy color management.
*/
static inline Bool
drmmode_cm_enabled(drmmode_ptr drmmode)
{
return drmmode->cm_prop_ids[CM_GAMMA_LUT_SIZE] != 0;
}
/* Can the page flip ioctl be used for this CRTC? */
static inline Bool
drmmode_crtc_can_flip(xf86CrtcPtr crtc)