Skip to content

Commit 3e9b065

Browse files
ckborahjnikula
authored andcommitted
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>
1 parent 4cd8a64 commit 3e9b065

5 files changed

Lines changed: 30 additions & 0 deletions

File tree

drivers/gpu/drm/i915/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ i915-y += \
239239
display/intel_cdclk.o \
240240
display/intel_cmtg.o \
241241
display/intel_color.o \
242+
display/intel_colorop.o \
242243
display/intel_combo_phy.o \
243244
display/intel_connector.o \
244245
display/intel_crtc.o \
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: MIT
2+
/*
3+
* Copyright © 2025 Intel Corporation
4+
*/
5+
#include "intel_colorop.h"
6+
7+
struct intel_colorop *to_intel_colorop(struct drm_colorop *colorop)
8+
{
9+
return container_of(colorop, struct intel_colorop, base);
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* SPDX-License-Identifier: MIT */
2+
/*
3+
* Copyright © 2025 Intel Corporation
4+
*/
5+
6+
#ifndef __INTEL_COLOROP_H__
7+
#define __INTEL_COLOROP_H__
8+
9+
#include "intel_display_types.h"
10+
11+
struct intel_colorop *to_intel_colorop(struct drm_colorop *colorop);
12+
13+
#endif /* __INTEL_COLOROP_H__ */

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,11 @@ struct intel_dp_mst_encoder {
19851985
struct intel_connector *connector;
19861986
};
19871987

1988+
struct intel_colorop {
1989+
struct drm_colorop base;
1990+
enum intel_color_block id;
1991+
};
1992+
19881993
static inline struct intel_encoder *
19891994
intel_attached_encoder(struct intel_connector *connector)
19901995
{

drivers/gpu/drm/xe/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
242242
i915-display/intel_cdclk.o \
243243
i915-display/intel_cmtg.o \
244244
i915-display/intel_color.o \
245+
i915-display/intel_colorop.o \
245246
i915-display/intel_combo_phy.o \
246247
i915-display/intel_connector.o \
247248
i915-display/intel_crtc.o \

0 commit comments

Comments
 (0)