]> Gentwo Git Trees - linux/.git/commitdiff
drm/i915: Add intel_color_op
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Wed, 3 Dec 2025 08:51:58 +0000 (14:21 +0530)
committerJani Nikula <jani.nikula@intel.com>
Thu, 4 Dec 2025 17:43:46 +0000 (19:43 +0200)
Add data structure to store intel specific details of colorop

v2:
 - Remove dead code
 - Convert macro to function (Jani)
 - Remove colorop state as it is not being used
 - Refactor to separate file

Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patch.msgid.link/20251203085211.3663374-3-uma.shankar@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_colorop.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_colorop.h [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/xe/Makefile

index 7c89e5e0a277eb4f9c054a9659ba0a80899cc157..f1ca1413a0dc7c2b46206f9acceed427b751aa2d 100644 (file)
@@ -239,6 +239,7 @@ i915-y += \
        display/intel_cdclk.o \
        display/intel_cmtg.o \
        display/intel_color.o \
+       display/intel_colorop.o \
        display/intel_combo_phy.o \
        display/intel_connector.o \
        display/intel_crtc.o \
diff --git a/drivers/gpu/drm/i915/display/intel_colorop.c b/drivers/gpu/drm/i915/display/intel_colorop.c
new file mode 100644 (file)
index 0000000..eaab50d
--- /dev/null
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+#include "intel_colorop.h"
+
+struct intel_colorop *to_intel_colorop(struct drm_colorop *colorop)
+{
+       return container_of(colorop, struct intel_colorop, base);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_colorop.h b/drivers/gpu/drm/i915/display/intel_colorop.h
new file mode 100644 (file)
index 0000000..23a29a5
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef __INTEL_COLOROP_H__
+#define __INTEL_COLOROP_H__
+
+#include "intel_display_types.h"
+
+struct intel_colorop *to_intel_colorop(struct drm_colorop *colorop);
+
+#endif /* __INTEL_COLOROP_H__ */
index 38702a9e0f5084ef0b19e4a577ce07bfc7ce9926..bb8b8466235abc74183744aa104adde2316e183b 100644 (file)
@@ -1985,6 +1985,11 @@ struct intel_dp_mst_encoder {
        struct intel_connector *connector;
 };
 
+struct intel_colorop {
+       struct drm_colorop base;
+       enum intel_color_block id;
+};
+
 static inline struct intel_encoder *
 intel_attached_encoder(struct intel_connector *connector)
 {
index e4b273b025d2a825b8d1aeb33f38ee268998c5a0..e468407c9457c67914de21687b2e0310b13432fc 100644 (file)
@@ -242,6 +242,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
        i915-display/intel_cdclk.o \
        i915-display/intel_cmtg.o \
        i915-display/intel_color.o \
+       i915-display/intel_colorop.o \
        i915-display/intel_combo_phy.o \
        i915-display/intel_connector.o \
        i915-display/intel_crtc.o \