drm/i915: Add intel_color_op

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>
This commit is contained in:
Chaitanya Kumar Borah
2025-12-03 14:21:58 +05:30
committed by Jani Nikula
parent 4cd8a64b15
commit 3e9b06559a
5 changed files with 30 additions and 0 deletions

View 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 \

View File

@@ -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);
}

View File

@@ -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__ */

View 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)
{

View 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 \