Commit 82106247 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Expose the legacy LUT via the GAMMA_LUT/GAMMA_LUT_SIZE props on gen2/3

Just so we don't leave gen2/3 out in the cold let's advertize the
legacy LUT via the GAMMA_LUT/GAMMA_LUT_SIZE props. Without the
GAMMA_LUT prop we can't actually load a LUT using the atomic ioctl
(in preparation for the day of 100% atomic driver).

Supposedly some gen2/3 platforms have an interpolated 10bit gamma mode
as well. It's slightly funkier than the i965+ mode since you have to
specify the slope for the interpolation by hand. But when I tried it
I couldn't get it to work, the hardware just insisted on using the
8bit more regardless of the state of the relevant PIPECONF bit.
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190401200231.2333-7-ville.syrjala@linux.intel.comReviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
parent e262568e
...@@ -116,6 +116,8 @@ ...@@ -116,6 +116,8 @@
[PIPE_C] = IVB_CURSOR_C_OFFSET, \ [PIPE_C] = IVB_CURSOR_C_OFFSET, \
} }
#define I9XX_COLORS \
.color = { .gamma_lut_size = 256 }
#define I965_COLORS \ #define I965_COLORS \
.color = { .gamma_lut_size = 129, \ .color = { .gamma_lut_size = 129, \
.gamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \ .gamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \
...@@ -156,6 +158,7 @@ ...@@ -156,6 +158,7 @@
.has_coherent_ggtt = false, \ .has_coherent_ggtt = false, \
I9XX_PIPE_OFFSETS, \ I9XX_PIPE_OFFSETS, \
I9XX_CURSOR_OFFSETS, \ I9XX_CURSOR_OFFSETS, \
I9XX_COLORS, \
GEN_DEFAULT_PAGE_SIZES GEN_DEFAULT_PAGE_SIZES
#define I845_FEATURES \ #define I845_FEATURES \
...@@ -172,6 +175,7 @@ ...@@ -172,6 +175,7 @@
.has_coherent_ggtt = false, \ .has_coherent_ggtt = false, \
I845_PIPE_OFFSETS, \ I845_PIPE_OFFSETS, \
I845_CURSOR_OFFSETS, \ I845_CURSOR_OFFSETS, \
I9XX_COLORS, \
GEN_DEFAULT_PAGE_SIZES GEN_DEFAULT_PAGE_SIZES
static const struct intel_device_info intel_i830_info = { static const struct intel_device_info intel_i830_info = {
...@@ -205,6 +209,7 @@ static const struct intel_device_info intel_i865g_info = { ...@@ -205,6 +209,7 @@ static const struct intel_device_info intel_i865g_info = {
.has_coherent_ggtt = true, \ .has_coherent_ggtt = true, \
I9XX_PIPE_OFFSETS, \ I9XX_PIPE_OFFSETS, \
I9XX_CURSOR_OFFSETS, \ I9XX_CURSOR_OFFSETS, \
I9XX_COLORS, \
GEN_DEFAULT_PAGE_SIZES GEN_DEFAULT_PAGE_SIZES
static const struct intel_device_info intel_i915g_info = { static const struct intel_device_info intel_i915g_info = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment