Skip to contentSkip to conversation

drm/i915: adding state checker for gamma lut values

RFC New [email protected] 2 participants 2 messages Mar 15, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 drm/i915: adding state checker for gamma lut values

From: Swati Sharma <[email protected]>

Added state checker to validate gamma_lut values. This reads hardware state, and compares the originally requested state to the state read from hardware.

This implementation can be used for Gen9+ platforms, I haven't implemented it for legacy platforms. Just want to get feedback if this is the right approach to follow.

Also, inverse function of drm_color_lut_extract is missing to convert hardware read values back to user values. Thinking for that. I have added all "TODOs" and "Placeholders".

Another approach:
Storing "word" to be written into hardware in dev_priv and instead of comparing blob, comparing "word"? In dev_priv, only pointer will be there (something like *gamma_word).

For this too, I will send a patch to make it more clear.

---
 drivers/gpu/drm/i915/i915_drv.h      |   1 +
 drivers/gpu/drm/i915/intel_color.c   | 127 +++++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/intel_display.c |  50 ++++++++++++++
 drivers/gpu/drm/i915/intel_drv.h     |   1 +
 4 files changed, 173 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index c4ffe19..b41bfaa 100644
@@ -334,6 +334,7 @@ struct drm_i915_display_funcs {
 	 * involved with the same commit.
 	 */
 	void (*load_luts)(const struct intel_crtc_state *crtc_state);
+	void (*get_config)(struct intel_crtc_state *crtc_state);
 };
 
 #define CSR_VERSION(major, minor)	((major) << 16 | (minor))
drivers/gpu/drm/i915/intel_color.c +121 -6

161 lines not on this page · raw message

drivers/gpu/drm/i915/intel_display.c +50 -0

86 lines not on this page · raw message

drivers/gpu/drm/i915/intel_drv.h +1 -0
index 40ebc94..a6acd9b 100644
@@ -2512,6 +2512,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 int intel_color_check(struct intel_crtc_state *crtc_state);
 void intel_color_commit(const struct intel_crtc_state *crtc_state);
 void intel_color_load_luts(const struct intel_crtc_state *crtc_state);
+void intel_color_get_config(struct intel_crtc_state *crtc_state);
 
 /* intel_lspcon.c */
 bool lspcon_init(struct intel_digital_port *intel_dig_port);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915: adding state checker for gamma lut values

== Series Details ==

== Series Details ==

Series: drm/i915: adding state checker for gamma lut values
URL : https://patchwork.freedesktop.org/series/58039/
State : failure

== Summary ==

Applying: drm/i915: adding state checker for gamma lut values Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_drv.h
M drivers/gpu/drm/i915/intel_color.c
M drivers/gpu/drm/i915/intel_display.c
M drivers/gpu/drm/i915/intel_drv.h
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/intel_drv.h
Auto-merging drivers/gpu/drm/i915/intel_display.c Auto-merging drivers/gpu/drm/i915/intel_color.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_color.c Auto-merging drivers/gpu/drm/i915/i915_drv.h
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915: adding state checker for gamma lut values When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx