diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2016-03-18 17:33:01 +0000 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2016-03-21 11:46:18 -0700 |
commit | 1716625e1e77c4e42afa3ed7afe4151ae787258d (patch) | |
tree | 617101958912a7d291e7e14bef913f5663f3c231 /lib/igt_kms.h | |
parent | 59b5487625b537f15533e163728053a6e56a7c57 (diff) |
lib: kms: add helpers for color management properties on pipes
v2: Rename CTM_MATRIX property to CTM
v3: Add support for atomic commits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r-- | lib/igt_kms.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 0a2d1b62..8ae11924 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -108,6 +108,9 @@ void kmstest_restore_vt_mode(void); enum igt_atomic_crtc_properties { IGT_CRTC_BACKGROUND = 0, + IGT_CRTC_CTM, + IGT_CRTC_DEGAMMA_LUT, + IGT_CRTC_GAMMA_LUT, IGT_NUM_CRTC_PROPS }; @@ -256,6 +259,15 @@ struct igt_pipe { uint64_t background; /* Background color MSB BGR 16bpc LSB */ uint32_t background_changed : 1; uint32_t background_property; + + uint64_t degamma_blob; + uint32_t degamma_property; + uint64_t ctm_blob; + uint32_t ctm_property; + uint64_t gamma_blob; + uint32_t gamma_property; + uint32_t color_mgmt_changed : 1; + uint32_t crtc_id; }; @@ -295,12 +307,19 @@ drmModeModeInfo *igt_output_get_mode(igt_output_t *output); void igt_output_override_mode(igt_output_t *output, drmModeModeInfo *mode); void igt_output_set_pipe(igt_output_t *output, enum pipe pipe); igt_plane_t *igt_output_get_plane(igt_output_t *output, enum igt_plane plane); +bool igt_pipe_get_property(igt_pipe_t *pipe, const char *name, + uint32_t *prop_id, uint64_t *value, + drmModePropertyPtr *prop); static inline bool igt_plane_supports_rotation(igt_plane_t *plane) { return plane->rotation_property != 0; } +void igt_pipe_set_degamma_lut(igt_pipe_t *pipe, void *ptr, size_t length); +void igt_pipe_set_ctm_matrix(igt_pipe_t *pipe, void *ptr, size_t length); +void igt_pipe_set_gamma_lut(igt_pipe_t *pipe, void *ptr, size_t length); + void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb); void igt_plane_set_position(igt_plane_t *plane, int x, int y); void igt_plane_set_size(igt_plane_t *plane, int w, int h); @@ -368,4 +387,3 @@ const unsigned char* igt_kms_get_alt_edid(void); #endif /* __IGT_KMS_H__ */ - |