Skip to contentSkip to conversation

Display Global Histogram

PATCH Superseded Arun R Murthy 5 participants 23 messages Dec 3, 2024 – Dec 4, 2024

Subsystems (5)

v9 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v9 cover Display Global Histogram

Display histogram is a hardware functionality where a statistics for 'x' number of frames is generated to form a histogram data. This is notified to the user via histogram event. Compositor will then upon sensing the histogram event will read the histogram data from KMD via crtc property. A library can be developed to take this generated histogram as an input and apply some algorithm to generate an Image EnhancemenT(IET). This is further fed back to the KMD via crtc property. KMD will use this IET as a multiplicand factor to multiply with the incoming pixels at the end of the pipe which is then pushed onto the display.

One such library Global Histogram Enhancement(GHE) will take the histogram as input and applied the algorithm to enhance the density and then return the enhanced factor. This library can be located @
https://github.com/intel/ghe

The corresponding mutter changes to enable/disable histogram, read the
histogram data, communicate with the library and write the enhanced data
back to the KMD is also pushed for review at https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3873
and https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3873/diffs?commit_id=270808ca7c8be48513553d95b4a47541f5d40206
The IGT changes for validating the histogram event and reading the
histogram is also pushed for review at https://patchwork.freedesktop.org/series/135789/

Test-with: [email protected]

Arun R Murthy (10):
drm/crtc: Add histogram properties
drm/crtc: Expose API to create drm crtc property for histogram drm/i915/histogram: Define registers for histogram drm/i915/histogram: Add support for histogram drm/xe: Add histogram support to Xe builds drm/i915/histogram: histogram interrupt handling drm/i915/display: handle drm-crtc histogram property updates drm/i915/histogram: histogram delay counter doesnt reset drm/i915/histogram: Histogram changes for Display 20+ drm/i915/histogram: Enable pipe dithering

 drivers/gpu/drm/drm_atomic_state_helper.c     |   6 +
 drivers/gpu/drm/drm_atomic_uapi.c             |  17 +
 drivers/gpu/drm/drm_crtc.c                    |  30 ++
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/intel_atomic.c   |   1 +
 drivers/gpu/drm/i915/display/intel_crtc.c     |   7 +
 drivers/gpu/drm/i915/display/intel_display.c  |  17 +
 .../gpu/drm/i915/display/intel_display_irq.c  |   6 +-
 .../drm/i915/display/intel_display_types.h    |   4 +
 .../gpu/drm/i915/display/intel_histogram.c    | 380 ++++++++++++++++++
 .../gpu/drm/i915/display/intel_histogram.h    |  40 ++
 .../drm/i915/display/intel_histogram_regs.h   |  75 ++++
 drivers/gpu/drm/i915/i915_reg.h               |   5 +-
 drivers/gpu/drm/xe/Makefile                   |   1 +
 include/drm/drm_crtc.h                        |  49 +++
 include/uapi/drm/drm_mode.h                   |  11 +
 16 files changed, 647 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram_regs.h
Signature · 1 line
2.25.1
#1 lore raw

PATCH v9 1/10 drm/crtc: Add histogram properties

Add variables for histogram drm_property, its corrsponding crtc_state variables and define the structure pointed by the blob property.

---
 include/drm/drm_crtc.h      | 48 +++++++++++++++++++++++++++++++++++++
 include/uapi/drm/drm_mode.h | 11 +++++++++
 2 files changed, 59 insertions(+)
include/drm/drm_crtc.h +48 -0
index 8b48a1974da3..3984cfa00cbf 100644
@@ -274,6 +274,38 @@ struct drm_crtc_state {
 	 */
 	struct drm_property_blob *gamma_lut;
 
+	/**
+	 * @histogram_enable:
+	 *
+	 * This will be set if histogram is enabled for the CRTC.
+	 */
+	bool histogram_enable;
+
+	/**
+	 * @histogram_data:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram data generated by the hardware.
+	 */
+	struct drm_property_blob *histogram_data;
+
+	/**
+	 * @histogram_-iet:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram image enhancement generated by the algorithm that is to
+	 * be fed back to the hardware.
+	 */
+	struct drm_property_blob *histogram_iet;
+	/**
+	 * @histogram_iet_updates:
+	 *
+	 * Convey that the image enhanced data has been updated by the user
+	 */
+	bool histogram_iet_updated;
+
 	/**
 	 * @target_vblank:
 	 *
@@ -1088,6 +1120,22 @@ struct drm_crtc {
 	 */
 	struct drm_property *scaling_filter_property;
 
+	/**
+	 * @histogram_enable_property: Optional CRTC property for enabling or
+	 * disabling global histogram.
+	 */
+	struct drm_property *histogram_enable_property;
+	/**
+	 * @histogram_data_proeprty: Optional CRTC property for getting the
+	 * histogram blob data.
+	 */
+	struct drm_property *histogram_data_property;
+	/**
+	 * @histogram_iet_proeprty: Optional CRTC property for writing the
+	 * image enhanced blob data
+	 */
+	struct drm_property *histogram_iet_property;
+
 	/**
 	 * @state:
 	 *
include/uapi/drm/drm_mode.h +11 -0
index c082810c08a8..da4396f57ed1 100644
@@ -1355,6 +1355,17 @@ struct drm_mode_closefb {
 	__u32 pad;
 };
 
+/**
+ * struct drm_histogram
+ * data_ptr: pointer to the array fo u32 data. This data can be histogram
+ * raw data or image enhanced data
+ * nr_elements: number of elements pointed by the data @data_ptr
+ */
+struct drm_histogram {
+	__u64 data_ptr;
+	__u32 nr_elements;
+};
+
 #if defined(__cplusplus)
 }
 #endif
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 01/10] drm/crtc: Add histogram properties

Quoted 2 lines · Arun R Murthy

Add variables for histogram drm_property, its corrsponding crtc_state variables and define the structure pointed by the blob property.

Missing description of the data format. How can other drivers implememt it if the format is not documented?

Quoted 98 lines
---
 include/drm/drm_crtc.h      | 48 +++++++++++++++++++++++++++++++++++++
 include/uapi/drm/drm_mode.h | 11 +++++++++
 2 files changed, 59 insertions(+)
include/drm/drm_crtc.h +48 -0
index 8b48a1974da3..3984cfa00cbf 100644
@@ -274,6 +274,38 @@ struct drm_crtc_state {
 	 */
 	struct drm_property_blob *gamma_lut;
 
+	/**
+	 * @histogram_enable:
+	 *
+	 * This will be set if histogram is enabled for the CRTC.
+	 */
+	bool histogram_enable;
+
+	/**
+	 * @histogram_data:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram data generated by the hardware.
+	 */
+	struct drm_property_blob *histogram_data;
+
+	/**
+	 * @histogram_-iet:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram image enhancement generated by the algorithm that is to
+	 * be fed back to the hardware.
+	 */
+	struct drm_property_blob *histogram_iet;
+	/**
+	 * @histogram_iet_updates:
+	 *
+	 * Convey that the image enhanced data has been updated by the user
+	 */
+	bool histogram_iet_updated;
+
 	/**
 	 * @target_vblank:
 	 *
@@ -1088,6 +1120,22 @@ struct drm_crtc {
 	 */
 	struct drm_property *scaling_filter_property;
 
+	/**
+	 * @histogram_enable_property: Optional CRTC property for enabling or
+	 * disabling global histogram.
+	 */
+	struct drm_property *histogram_enable_property;
+	/**
+	 * @histogram_data_proeprty: Optional CRTC property for getting the
+	 * histogram blob data.
+	 */
+	struct drm_property *histogram_data_property;
+	/**
+	 * @histogram_iet_proeprty: Optional CRTC property for writing the
+	 * image enhanced blob data
+	 */
+	struct drm_property *histogram_iet_property;
+
 	/**
 	 * @state:
 	 *
include/uapi/drm/drm_mode.h +11 -0
index c082810c08a8..da4396f57ed1 100644
@@ -1355,6 +1355,17 @@ struct drm_mode_closefb {
 	__u32 pad;
 };
 
+/**
+ * struct drm_histogram
+ * data_ptr: pointer to the array fo u32 data. This data can be histogram
+ * raw data or image enhanced data
+ * nr_elements: number of elements pointed by the data @data_ptr
+ */
+struct drm_histogram {
+	__u64 data_ptr;
+	__u32 nr_elements;
+};
+
 #if defined(__cplusplus)
 }
 #endif
Signature · 1 line
2.25.1
Signature · 2 lines
With best wishes
Dmitry
#3 lore raw

RE: [PATCH 01/10] drm/crtc: Add histogram properties

In reply to Arun R Murthy
Quoted 25 lines

-----Original Message-----
From: Intel-xe <[email protected]> On Behalf Of Arun R Murthy
Sent: Tuesday, December 3, 2024 11:25 AM
To: [email protected]; [email protected]; dri- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCH 01/10] drm/crtc: Add histogram properties

Add variables for histogram drm_property, its corrsponding crtc_state variables and define the structure pointed by the blob property.

---
 include/drm/drm_crtc.h      | 48 +++++++++++++++++++++++++++++++++++++
 include/uapi/drm/drm_mode.h | 11 +++++++++
 2 files changed, 59 insertions(+)
include/drm/drm_crtc.h index renamed from include/drm/drm_crtc.h +0 -0

8b48a1974da3..3984cfa00cbf 100644

include/drm/drm_crtc.h struct drm_crtc_state { · line 281

Quoted 8 lines
include/drm/drm_crtc.h +5 -0
@@ -274,6 +274,38 @@ struct drm_crtc_state {
 	 */
 	struct drm_property_blob *gamma_lut;
 
+	/**
+	 * @histogram_enable:
+	 *
+	 * This will be set if histogram is enabled for the CRTC.
+	 */

Shouldn't it be "will be set if histogram needs to be enabled"

Regards,
Suraj Kandpal

Quoted 80 lines
include/drm/drm_crtc.h +17 -0
+	bool histogram_enable;
+
+	/**
+	 * @histogram_data:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram data generated by the hardware.
+	 */
+	struct drm_property_blob *histogram_data;
+
+	/**
+	 * @histogram_-iet:
+	 *
+	 * This will hold the pointer to the struct drm_histogram.
+	 * The element data in drm_histogram will hold the pointer to the
+	 * histogram image enhancement generated by the algorithm that is

to

include/drm/drm_crtc.h +7 -0
+	 * be fed back to the hardware.
+	 */
+	struct drm_property_blob *histogram_iet;
+	/**
+	 * @histogram_iet_updates:
+	 *
+	 * Convey that the image enhanced data has been updated by the

user

include/drm/drm_crtc.h +5 -0
+	 */
+	bool histogram_iet_updated;
+
 	/**
 	 * @target_vblank:
 	 *
@@ -1088,6 +1120,22 @@ struct drm_crtc {
 	 */
 	struct drm_property *scaling_filter_property;
 
+	/**
+	 * @histogram_enable_property: Optional CRTC property for enabling

or

include/drm/drm_crtc.h +14 -0
+	 * disabling global histogram.
+	 */
+	struct drm_property *histogram_enable_property;
+	/**
+	 * @histogram_data_proeprty: Optional CRTC property for getting the
+	 * histogram blob data.
+	 */
+	struct drm_property *histogram_data_property;
+	/**
+	 * @histogram_iet_proeprty: Optional CRTC property for writing the
+	 * image enhanced blob data
+	 */
+	struct drm_property *histogram_iet_property;
+
 	/**
 	 * @state:
 	 *
include/uapi/drm/drm_mode.h +11 -1
index c082810c08a8..da4396f57ed1 100644
@@ -1355,6 +1355,17 @@ struct drm_mode_closefb {
 	__u32 pad;
 };
 
+/**
+ * struct drm_histogram
+ * data_ptr: pointer to the array fo u32 data. This data can be
+histogram
+ * raw data or image enhanced data
+ * nr_elements: number of elements pointed by the data @data_ptr  */
+struct drm_histogram {
+	__u64 data_ptr;
+	__u32 nr_elements;
+};
+
 #if defined(__cplusplus)
 }
 #endif
--

2.25.1

#4 lore raw

PATCH v9 2/10 drm/crtc: Expose API to create drm crtc property for histogram

In reply to Arun R Murthy

Add drm-crtc property for histogram and for the properties added add corresponding get/set_property.

---
 drivers/gpu/drm/drm_atomic_state_helper.c |  6 +++++
 drivers/gpu/drm/drm_atomic_uapi.c         | 17 +++++++++++++
 drivers/gpu/drm/drm_crtc.c                | 30 +++++++++++++++++++++++
 include/drm/drm_crtc.h                    |  1 +
 4 files changed, 54 insertions(+)
drivers/gpu/drm/drm_atomic_state_helper.c +6 -0
index 519228eb1095..3b2b58e36a6d 100644
@@ -143,6 +143,8 @@ void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
 		drm_property_blob_get(state->ctm);
 	if (state->gamma_lut)
 		drm_property_blob_get(state->gamma_lut);
+	if (state->histogram_data)
+		drm_property_blob_get(state->histogram_data);
 	state->mode_changed = false;
 	state->active_changed = false;
 	state->planes_changed = false;
@@ -156,6 +158,8 @@ void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
 	/* Self refresh should be canceled when a new update is available */
 	state->active = drm_atomic_crtc_effectively_active(state);
 	state->self_refresh_active = false;
+
+	state->histogram_iet_updated = false;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_crtc_duplicate_state);
 
@@ -215,6 +219,8 @@ void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state)
 	drm_property_blob_put(state->degamma_lut);
 	drm_property_blob_put(state->ctm);
 	drm_property_blob_put(state->gamma_lut);
+	if (state->histogram_data)
+		drm_property_blob_put(state->histogram_data);
 }
 EXPORT_SYMBOL(__drm_atomic_helper_crtc_destroy_state);
 
drivers/gpu/drm/drm_atomic_uapi.c +17 -0
index 370dc676e3aa..367f87afea92 100644
@@ -415,6 +415,17 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 			return -EFAULT;
 
 		set_out_fence_for_crtc(state->state, crtc, fence_ptr);
+	} else if (property == crtc->histogram_enable_property) {
+		state->histogram_enable = val;
+	} else if (property == crtc->histogram_iet_property) {
+		ret = drm_property_replace_blob_from_id(dev,
+							&state->histogram_iet,
+							val,
+							-1,
+							sizeof(struct drm_histogram),
+							&replaced);
+		state->histogram_iet_updated |= replaced;
+		return ret;
 	} else if (property == crtc->scaling_filter_property) {
 		state->scaling_filter = val;
 	} else if (crtc->funcs->atomic_set_property) {
@@ -452,6 +463,12 @@ drm_atomic_crtc_get_property(struct drm_crtc *crtc,
 		*val = (state->gamma_lut) ? state->gamma_lut->base.id : 0;
 	else if (property == config->prop_out_fence_ptr)
 		*val = 0;
+	else if (property == crtc->histogram_enable_property)
+		*val = state->histogram_enable;
+	else if (property == crtc->histogram_data_property)
+		*val = (state->histogram_data) ? state->histogram_data->base.id : 0;
+	else if (property == crtc->histogram_iet_property)
+		*val = (state->histogram_iet) ? state->histogram_iet->base.id : 0;
 	else if (property == crtc->scaling_filter_property)
 		*val = state->scaling_filter;
 	else if (crtc->funcs->atomic_get_property)
drivers/gpu/drm/drm_crtc.c +30 -0
index 3488ff067c69..ec169a5b35a2 100644
@@ -939,3 +939,33 @@ int drm_crtc_create_scaling_filter_property(struct drm_crtc *crtc,
 	return 0;
 }
 EXPORT_SYMBOL(drm_crtc_create_scaling_filter_property);
+
+int drm_crtc_create_histogram_property(struct drm_crtc *crtc)
+{
+	struct drm_property *prop;
+
+	prop = drm_property_create_bool(crtc->dev, DRM_MODE_PROP_ATOMIC,
+					"HISTOGRAM_ENABLE");
+	if (!prop)
+		return -ENOMEM;
+	drm_object_attach_property(&crtc->base, prop, 0);
+	crtc->histogram_enable_property = prop;
+
+	prop = drm_property_create(crtc->dev, DRM_MODE_PROP_ATOMIC |
+				   DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB,
+				   "HISTOGRAM_DATA", 0);
+	if (!prop)
+		return -ENOMEM;
+	drm_object_attach_property(&crtc->base, prop, 0);
+	crtc->histogram_data_property = prop;
+
+	prop = drm_property_create(crtc->dev, DRM_MODE_PROP_ATOMIC |
+				   DRM_MODE_PROP_BLOB, "HISTOGRAM_IET", 0);
+	if (!prop)
+		return -ENOMEM;
+	drm_object_attach_property(&crtc->base, prop, 0);
+	crtc->histogram_iet_property = prop;
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_crtc_create_histogram_property);
include/drm/drm_crtc.h +1 -0
index 3984cfa00cbf..d1b9fae5592d 100644
@@ -1371,5 +1371,6 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
 
 int drm_crtc_create_scaling_filter_property(struct drm_crtc *crtc,
 					    unsigned int supported_filters);
+int drm_crtc_create_histogram_property(struct drm_crtc *crtc);
 
 #endif /* __DRM_CRTC_H__ */
Signature · 1 line
2.25.1
#5 lore raw

PATCH v2 3/10 drm/i915/histogram: Define registers for histogram

In reply to Arun R Murthy

Add the register/bit definitions for global histogram.

v2: Intended the register contents, removed unused regs (Jani)

Bspec: 4270

---
 .../drm/i915/display/intel_histogram_regs.h   | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram_regs.h
drivers/gpu/drm/i915/display/intel_histogram_regs.h new file +48 -0
new file mode 100644
index 000000000000..1252b4f339a6
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef __INTEL_HISTOGRAM_REGS_H__
+#define __INTEL_HISTOGRAM_REGS_H__
+
+#include "intel_display_reg_defs.h"
+
+/* GLOBAL_HIST related registers */
+#define _DPST_CTL_A					0x490C0
+#define _DPST_CTL_B					0x491C0
+#define DPST_CTL(pipe)					_MMIO_PIPE(pipe, _DPST_CTL_A, _DPST_CTL_B)
+#define  DPST_CTL_IE_HIST_EN				REG_BIT(31)
+#define  DPST_CTL_RESTORE				REG_BIT(28)
+#define  DPST_CTL_IE_MODI_TABLE_EN			REG_BIT(27)
+#define  DPST_CTL_HIST_MODE				REG_BIT(24)
+#define  DPST_CTL_ENHANCEMENT_MODE_MASK			REG_GENMASK(14, 13)
+#define  DPST_CTL_EN_MULTIPLICATIVE			REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
+#define  DPST_CTL_IE_TABLE_VALUE_FORMAT			REG_BIT(15)
+#define  DPST_CTL_BIN_REG_FUNC_SEL			REG_BIT(11)
+#define  DPST_CTL_BIN_REG_FUNC_TC			REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 0)
+#define  DPST_CTL_BIN_REG_FUNC_IE			REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 1)
+#define  DPST_CTL_BIN_REG_MASK				REG_GENMASK(6, 0)
+#define  DPST_CTL_BIN_REG_CLEAR				REG_FIELD_PREP(DPST_CTL_BIN_REG_MASK, 0)
+#define  DPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC	REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
+#define  DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC	REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
+#define  DPST_CTL_HIST_MODE_YUV				REG_FIELD_PREP(DPST_CTL_HIST_MODE, 0)
+#define  DPST_CTL_HIST_MODE_HSV				REG_FIELD_PREP(DPST_CTL_HIST_MODE, 1)
+
+#define _DPST_GUARD_A					0x490C8
+#define _DPST_GUARD_B					0x491C8
+#define DPST_GUARD(pipe)				_MMIO_PIPE(pipe, _DPST_GUARD_A, _DPST_GUARD_B)
+#define  DPST_GUARD_HIST_INT_EN				REG_BIT(31)
+#define  DPST_GUARD_HIST_EVENT_STATUS			REG_BIT(30)
+#define  DPST_GUARD_INTERRUPT_DELAY_MASK			REG_GENMASK(29, 22)
+#define  DPST_GUARD_INTERRUPT_DELAY(val)			REG_FIELD_PREP(DPST_GUARD_INTERRUPT_DELAY_MASK, val)
+#define  DPST_GUARD_THRESHOLD_GB_MASK			REG_GENMASK(21, 0)
+#define  DPST_GUARD_THRESHOLD_GB(val)			REG_FIELD_PREP(DPST_GUARD_THRESHOLD_GB_MASK, val)
+
+#define _DPST_BIN_A					0x490C4
+#define _DPST_BIN_B					0x491C4
+#define DPST_BIN(pipe)					_MMIO_PIPE(pipe, _DPST_BIN_A, _DPST_BIN_B)
+#define  DPST_BIN_DATA_MASK				REG_GENMASK(23, 0)
+#define  DPST_BIN_BUSY					REG_BIT(31)
+
+#endif /* __INTEL_HISTOGRAM_REGS_H__ */
Signature · 1 line
2.25.1
#6 lore raw

PATCH v5 4/10 drm/i915/histogram: Add support for histogram

In reply to Arun R Murthy

Statistics is generated from the image frame that is coming to display and an event is sent to user after reading this histogram data. This statistics/histogram is then shared with the user upon getting a request from user. User can then use this histogram and generate an enhancement factor. This enhancement factor can be multiplied/added with the incoming pixel data frame.

v2: forward declaration in header file along with error handling (Jani)
v3: Replaced i915 with intel_display (Suraj)
v4: Removed dithering enable/disable (Vandita)
New patch for histogram register definitions (Suraj)
v5: IET LUT pgm follow the seq in spec and removed change to TC at end

    (Suraj)
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 .../drm/i915/display/intel_display_types.h    |   2 +
 .../gpu/drm/i915/display/intel_histogram.c    | 202 ++++++++++++++++++
 .../gpu/drm/i915/display/intel_histogram.h    |  37 ++++
 4 files changed, 242 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h
drivers/gpu/drm/i915/Makefile +1 -0
index e465828d748f..97141b4def3b 100644
@@ -267,6 +267,7 @@ i915-y += \
 	display/intel_hdcp.o \
 	display/intel_hdcp_gsc.o \
 	display/intel_hdcp_gsc_message.o \
+	display/intel_histogram.o \
 	display/intel_hotplug.o \
 	display/intel_hotplug_irq.o \
 	display/intel_hti.o \
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
index 339e4b0f7698..351441efd10a 100644
@@ -1414,6 +1414,8 @@ struct intel_crtc {
 	/* for loading single buffered registers during vblank */
 	struct pm_qos_request vblank_pm_qos;
 
+	struct intel_histogram *histogram;
+
 #ifdef CONFIG_DEBUG_FS
 	struct intel_pipe_crc pipe_crc;
 #endif
drivers/gpu/drm/i915/display/intel_histogram.c new file +202 -0

202 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_histogram.h new file +37 -0
new file mode 100644
index 000000000000..fb01ffe8903f
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef __INTEL_HISTOGRAM_H__
+#define __INTEL_HISTOGRAM_H__
+
+#include <linux/types.h>
+
+struct drm_property_blob;
+struct intel_crtc;
+
+#define HISTOGRAM_BIN_COUNT                    32
+#define HISTOGRAM_IET_LENGTH                   33
+
+enum intel_global_hist_status {
+	INTEL_HISTOGRAM_ENABLE,
+	INTEL_HISTOGRAM_DISABLE,
+};
+
+enum intel_global_histogram {
+	INTEL_HISTOGRAM,
+};
+
+enum intel_global_hist_lut {
+	INTEL_HISTOGRAM_PIXEL_FACTOR,
+};
+
+int intel_histogram_atomic_check(struct intel_crtc *intel_crtc);
+int intel_histogram_update(struct intel_crtc *intel_crtc, bool enable);
+int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
+				struct drm_property_blob *blob);
+int intel_histogram_init(struct intel_crtc *intel_crtc);
+void intel_histogram_finish(struct intel_crtc *intel_crtc);
+
+#endif /* __INTEL_HISTOGRAM_H__ */
Signature · 1 line
2.25.1
#7 lore raw

PATCH v9 5/10 drm/xe: Add histogram support to Xe builds

In reply to Arun R Murthy

Histogram added as part of i915/display driver. Adding the same for xe as well.

---
 drivers/gpu/drm/xe/Makefile | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/Makefile +1 -0
index a93e6fcc0ad9..d383b0d35d8e 100644
@@ -245,6 +245,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
 	i915-display/intel_hdcp.o \
 	i915-display/intel_hdcp_gsc_message.o \
 	i915-display/intel_hdmi.o \
+	i915-display/intel_histogram.o \
 	i915-display/intel_hotplug.o \
 	i915-display/intel_hotplug_irq.o \
 	i915-display/intel_hti.o \
Signature · 1 line
2.25.1
#8 lore raw

Re: [PATCH 05/10] drm/xe: Add histogram support to Xe builds

kernel test robot noticed the following build warnings:

Hi Arun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip v6.13-rc1 next-20241128] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Arun-R-Murthy/drm-crtc-Add-histogram-properties/20241203-140702
base:   linus/master
patch link:    https://lore.kernel.org/r/20241203055520.1704661-6-arun.r.murthy%40intel.com
patch subject: [PATCH 05/10] drm/xe: Add histogram support to Xe builds
config: i386-buildonly-randconfig-003-20241203 (https://download.01.org/0day-ci/archive/20241203/[email protected]/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/i915/display/intel_histogram.c:7:
In file included from include/drm/drm_file.h:39:
In file included from include/drm/drm_prime.h:37:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]

     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/gpu/drm/i915/display/intel_histogram.c:145:7: warning: variable 'data' is uninitialized when used here [-Wuninitialized]
     145 |         if (!data) {
         |              ^~~~
   drivers/gpu/drm/i915/display/intel_histogram.c:134:11: note: initialize the variable 'data' to silence this warning
     134 |         u32 *data;
         |                  ^
         |                   = NULL

2 warnings generated.

vim +/data +145 drivers/gpu/drm/i915/display/intel_histogram.c

9d86b8b56c6c738 Arun R Murthy 2024-12-03  125  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  126  int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
9d86b8b56c6c738 Arun R Murthy 2024-12-03  127  				struct drm_property_blob *blob)
9d86b8b56c6c738 Arun R Murthy 2024-12-03  128  {
9d86b8b56c6c738 Arun R Murthy 2024-12-03  129  	struct intel_histogram *histogram = intel_crtc->histogram;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  130  	struct intel_display *display = to_intel_display(intel_crtc);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  131  	int pipe = intel_crtc->pipe;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  132  	int i = 0;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  133  	struct drm_histogram *hist;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  134  	u32 *data;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  135  	int ret;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  136  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  137  	if (!histogram)
9d86b8b56c6c738 Arun R Murthy 2024-12-03  138  		return -EINVAL;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  139  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  140  	if (!histogram->enable) {
9d86b8b56c6c738 Arun R Murthy 2024-12-03  141  		drm_err(display->drm, "histogram not enabled");
9d86b8b56c6c738 Arun R Murthy 2024-12-03  142  		return -EINVAL;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  143  	}
9d86b8b56c6c738 Arun R Murthy 2024-12-03  144  
9d86b8b56c6c738 Arun R Murthy 2024-12-03 @145  	if (!data) {
9d86b8b56c6c738 Arun R Murthy 2024-12-03  146  		drm_err(display->drm, "enhancement LUT data is NULL");
9d86b8b56c6c738 Arun R Murthy 2024-12-03  147  		return -EINVAL;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  148  	}
9d86b8b56c6c738 Arun R Murthy 2024-12-03  149  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  150  	/* Set DPST_CTL Bin Reg function select to IE & wait for a vblabk */
9d86b8b56c6c738 Arun R Murthy 2024-12-03  151  	intel_de_rmw(display, DPST_CTL(pipe),
9d86b8b56c6c738 Arun R Murthy 2024-12-03  152  		     DPST_CTL_BIN_REG_FUNC_SEL, DPST_CTL_BIN_REG_FUNC_IE);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  153  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  154  	drm_crtc_wait_one_vblank(&intel_crtc->base);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  155  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  156  	 /* Set DPST_CTL Bin Register Index to 0 */
9d86b8b56c6c738 Arun R Murthy 2024-12-03  157  	intel_de_rmw(display, DPST_CTL(pipe),
9d86b8b56c6c738 Arun R Murthy 2024-12-03  158  		     DPST_CTL_BIN_REG_MASK, DPST_CTL_BIN_REG_CLEAR);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  159  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  160  	hist = (struct drm_histogram *)blob->data;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  161  	data = kzalloc(sizeof(data) * hist->nr_elements, GFP_KERNEL);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  162  	if (!data)
9d86b8b56c6c738 Arun R Murthy 2024-12-03  163  		return -ENOMEM;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  164  	ret = copy_from_user(data, (uint32_t __user *)(unsigned long)hist->data_ptr,
9d86b8b56c6c738 Arun R Murthy 2024-12-03  165  			     sizeof(uint32_t) * hist->nr_elements);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  166  	if (ret)
9d86b8b56c6c738 Arun R Murthy 2024-12-03  167  		return ret;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  168  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  169  	for (i = 0; i < HISTOGRAM_IET_LENGTH; i++) {
9d86b8b56c6c738 Arun R Murthy 2024-12-03  170  		intel_de_rmw(display, DPST_BIN(pipe),
9d86b8b56c6c738 Arun R Murthy 2024-12-03  171  			     DPST_BIN_DATA_MASK, data[i]);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  172  		drm_dbg_atomic(display->drm, "iet_lut[%d]=%x\n", i, data[i]);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  173  	}
9d86b8b56c6c738 Arun R Murthy 2024-12-03  174  	kfree(data);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  175  	drm_property_blob_put(intel_crtc->base.state->histogram_iet);
9d86b8b56c6c738 Arun R Murthy 2024-12-03  176  
9d86b8b56c6c738 Arun R Murthy 2024-12-03  177  	return 0;
9d86b8b56c6c738 Arun R Murthy 2024-12-03  178  }
9d86b8b56c6c738 Arun R Murthy 2024-12-03  179  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#9 lore raw

PATCH v5 6/10 drm/i915/histogram: histogram interrupt handling

In reply to Arun R Murthy

Upon enabling histogram an interrupt is trigerred after the generation of the statistics. This patch registers the histogram interrupt and handles the interrupt.

v2: Added intel_crtc backpointer to intel_histogram struct (Jani)

    Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)

v3: Replaced drm_i915_private with intel_display (Suraj)
Refactored the histogram read code (Jani)
v4: Rebased after addressing comments on patch 1
v5: removed the retry logic and moved to patch7 (Jani)

---
 .../gpu/drm/i915/display/intel_display_irq.c  |  6 +-
 .../gpu/drm/i915/display/intel_histogram.c    | 87 ++++++++++++++++++-
 .../gpu/drm/i915/display/intel_histogram.h    |  3 +
 drivers/gpu/drm/i915/i915_reg.h               |  5 +-
 4 files changed, 96 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_display_irq.c +5 -1
index cb79c2796e3a..9eaca7125bf7 100644
@@ -20,6 +20,7 @@
 #include "intel_fdi_regs.h"
 #include "intel_fifo_underrun.h"
 #include "intel_gmbus.h"
+#include "intel_histogram.h"
 #include "intel_hotplug_irq.h"
 #include "intel_pipe_crc_regs.h"
 #include "intel_pmdemand.h"
@@ -1180,6 +1181,9 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 		if (iir & GEN8_PIPE_FIFO_UNDERRUN)
 			intel_cpu_fifo_underrun_irq_handler(dev_priv, pipe);
 
+		if (iir & GEN9_PIPE_HISTOGRAM_EVENT)
+			intel_histogram_irq_handler(display, pipe);
+
 		fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
 		if (fault_errors)
 			drm_err_ratelimited(&dev_priv->drm,
@@ -1774,7 +1778,7 @@ void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 	struct intel_uncore *uncore = &dev_priv->uncore;
 
 	u32 de_pipe_masked = gen8_de_pipe_fault_mask(dev_priv) |
-		GEN8_PIPE_CDCLK_CRC_DONE;
+		GEN8_PIPE_CDCLK_CRC_DONE | GEN9_PIPE_HISTOGRAM_EVENT;
 	u32 de_pipe_enables;
 	u32 de_port_masked = gen8_de_port_aux_mask(dev_priv);
 	u32 de_port_enables;
drivers/gpu/drm/i915/display/intel_histogram.c +85 -2

122 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_histogram.h +3 -0
index fb01ffe8903f..d7ddaab7ef54 100644
@@ -10,6 +10,8 @@
 
 struct drm_property_blob;
 struct intel_crtc;
+struct intel_display;
+enum pipe;
 
 #define HISTOGRAM_BIN_COUNT                    32
 #define HISTOGRAM_IET_LENGTH                   33
@@ -28,6 +30,7 @@ enum intel_global_hist_lut {
 };
 
 int intel_histogram_atomic_check(struct intel_crtc *intel_crtc);
+void intel_histogram_irq_handler(struct intel_display *display, enum pipe pipe);
 int intel_histogram_update(struct intel_crtc *intel_crtc, bool enable);
 int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
 				struct drm_property_blob *blob);
drivers/gpu/drm/i915/i915_reg.h +3 -2
index f48b5c809cec..836602e47511 100644
@@ -1605,7 +1605,7 @@
 #define   PIPE_HOTPLUG_INTERRUPT_ENABLE		(1UL << 26)
 #define   PIPE_VSYNC_INTERRUPT_ENABLE		(1UL << 25)
 #define   PIPE_DISPLAY_LINE_COMPARE_ENABLE	(1UL << 24)
-#define   PIPE_DPST_EVENT_ENABLE		(1UL << 23)
+#define   PIPE_HISTOGRAM_EVENT_ENABLE		(1UL << 23)
 #define   SPRITE0_FLIP_DONE_INT_EN_VLV		(1UL << 22)
 #define   PIPE_LEGACY_BLC_EVENT_ENABLE		(1UL << 22)
 #define   PIPE_ODD_FIELD_INTERRUPT_ENABLE	(1UL << 21)
@@ -1628,7 +1628,7 @@
 #define   PIPE_HOTPLUG_INTERRUPT_STATUS		(1UL << 10)
 #define   PIPE_VSYNC_INTERRUPT_STATUS		(1UL << 9)
 #define   PIPE_DISPLAY_LINE_COMPARE_STATUS	(1UL << 8)
-#define   PIPE_DPST_EVENT_STATUS		(1UL << 7)
+#define   PIPE_HISTOGRAM_EVENT_STATUS		(1UL << 7)
 #define   PIPE_A_PSR_STATUS_VLV			(1UL << 6)
 #define   PIPE_LEGACY_BLC_EVENT_STATUS		(1UL << 6)
 #define   PIPE_ODD_FIELD_INTERRUPT_STATUS	(1UL << 5)
@@ -2470,6 +2470,7 @@
 #define  GEN12_DSB_1_INT		REG_BIT(14) /* tgl+ */
 #define  GEN12_DSB_0_INT		REG_BIT(13) /* tgl+ */
 #define  GEN12_DSB_INT(dsb_id)		REG_BIT(13 + (dsb_id))
+#define  GEN9_PIPE_HISTOGRAM_EVENT	REG_BIT(12) /* skl+ */
 #define  GEN9_PIPE_CURSOR_FAULT		REG_BIT(11) /* skl+ */
 #define  GEN9_PIPE_PLANE4_FAULT		REG_BIT(10) /* skl+ */
 #define  GEN8_PIPE_CURSOR_FAULT		REG_BIT(10) /* bdw */
Signature · 1 line
2.25.1
Reviewed-by on v5 6/10
#10 lore raw

RE: [PATCHv5 06/10] drm/i915/histogram: histogram interrupt handling

Quoted 114 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Tuesday, December 3, 2024 11:25 AM
To: [email protected]; [email protected]; dri- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv5 06/10] drm/i915/histogram: histogram interrupt handling

Upon enabling histogram an interrupt is trigerred after the generation of the statistics. This patch registers the histogram interrupt and handles the interrupt.

v2: Added intel_crtc backpointer to intel_histogram struct (Jani)

    Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)

v3: Replaced drm_i915_private with intel_display (Suraj)
Refactored the histogram read code (Jani)
v4: Rebased after addressing comments on patch 1
v5: removed the retry logic and moved to patch7 (Jani)

---
 .../gpu/drm/i915/display/intel_display_irq.c  |  6 +-
 .../gpu/drm/i915/display/intel_histogram.c    | 87 ++++++++++++++++++-
 .../gpu/drm/i915/display/intel_histogram.h    |  3 +
 drivers/gpu/drm/i915/i915_reg.h               |  5 +-
 4 files changed, 96 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_display_irq.c +4 -0
index cb79c2796e3a..9eaca7125bf7 100644
@@ -20,6 +20,7 @@
 #include "intel_fdi_regs.h"
 #include "intel_fifo_underrun.h"
 #include "intel_gmbus.h"
+#include "intel_histogram.h"
 #include "intel_hotplug_irq.h"
 #include "intel_pipe_crc_regs.h"
 #include "intel_pmdemand.h"
@@ -1180,6 +1181,9 @@ void gen8_de_irq_handler(struct drm_i915_private
 *dev_priv, u32 master_ctl)
 		if (iir & GEN8_PIPE_FIFO_UNDERRUN)
 			intel_cpu_fifo_underrun_irq_handler(dev_priv, pipe);
 
+		if (iir & GEN9_PIPE_HISTOGRAM_EVENT)
+			intel_histogram_irq_handler(display, pipe);
+
 		fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
 		if (fault_errors)
drivers/gpu/drm/i915/display/intel_display_irq.c +1 -1
 			drm_err_ratelimited(&dev_priv->drm,
@@ -1774,7 +1778,7 @@ void gen8_de_irq_postinstall(struct
 drm_i915_private *dev_priv)
 	struct intel_uncore *uncore = &dev_priv->uncore;
 
 	u32 de_pipe_masked = gen8_de_pipe_fault_mask(dev_priv) |
-		GEN8_PIPE_CDCLK_CRC_DONE;
+		GEN8_PIPE_CDCLK_CRC_DONE |
 GEN9_PIPE_HISTOGRAM_EVENT;
 	u32 de_pipe_enables;
drivers/gpu/drm/i915/display/intel_display_irq.c +0 -0
 	u32 de_port_masked = gen8_de_port_aux_mask(dev_priv);
 	u32 de_port_enables;
drivers/gpu/drm/i915/display/intel_histogram.c +0 -0
index e9a431800553..57bb45b36a03 100644
@@ -19,7 +19,7 @@
 #define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300
 /* Precision factor for threshold guardband */  #define

HISTOGRAM_GUARDBAND_PRECISION_FACTOR 10000 -#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04

drivers/gpu/drm/i915/display/intel_histogram.c +31 -0
+#define HISTOGRAM_BIN_READ_RETRY_COUNT 5
 
 struct intel_histogram {
 	struct intel_crtc *crtc;
@@ -29,6 +29,84 @@ struct intel_histogram {
 	u32 bin_data[HISTOGRAM_BIN_COUNT];
 };
 
+static bool intel_histogram_get_data(struct intel_crtc *intel_crtc) {
+	struct intel_display *display = to_intel_display(intel_crtc);
+	struct intel_histogram *histogram = intel_crtc->histogram;
+	int index;
+	u32 dpstbin;
+
+	for (index = 0; index < ARRAY_SIZE(histogram->bin_data); index++) {
+		dpstbin = intel_de_read(display, DPST_BIN(intel_crtc->pipe));
+		if (!(dpstbin & DPST_BIN_BUSY)) {
+			histogram->bin_data[index] = dpstbin &
 DPST_BIN_DATA_MASK;
+		} else
+			return false;
+	}
+	return true;
+}
+
+static void intel_histogram_handle_int_work(struct work_struct *work) {
+	struct intel_histogram *histogram = container_of(work,
+		struct intel_histogram, work.work);
+	struct intel_crtc *intel_crtc = histogram->crtc;
+	struct intel_display *display = to_intel_display(intel_crtc);
+	char event[] = "HISTOGRAM=1", pipe_id[21];
+	char *histogram_event[] = { event, pipe_id, NULL };
+	int retry;
+
+	snprintf(pipe_id, sizeof(pipe_id),
+		 "PIPE=%u", intel_crtc->base.base.id);
+
+	/*
+	 * TODO: PSR to be exited while reading the Histogram data

drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 72

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +8 -0
+	 * Set DPST_CTL Bin Reg function select to TC
+	 * Set DPST_CTL Bin Register Index to 0
+	 */
+	intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+		     DPST_CTL_BIN_REG_FUNC_SEL |
 DPST_CTL_BIN_REG_MASK, 0);
+	for (retry = 0; retry < HISTOGRAM_BIN_READ_RETRY_COUNT; retry++)
 {
+		if (intel_histogram_get_data(intel_crtc)) {
+			/* Notify user for Histogram rediness */

Typo readiness

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1 -0
+			if (kobject_uevent_env(&display->drm->primary-
Quoted 1 line

kdev->kobj,

drivers/gpu/drm/i915/display/intel_histogram.c +3 -0
+					       KOBJ_CHANGE, histogram_event))
+				drm_err(display->drm,
+					"sending HISTOGRAM event

failed\n");

Nit: Start the debug statements with capital letter *Sending ...

Quoted 18 lines
drivers/gpu/drm/i915/display/intel_histogram.c +5 -0
+			break;
+		}
+	}
+	if (retry >= HISTOGRAM_BIN_READ_RETRY_COUNT) {
+		drm_err(display->drm, "Histogram bin read failed with max

retry\n");

drivers/gpu/drm/i915/display/intel_histogram.c +5 -0
+		return;
+	}
+
+	/* Enable histogram interrupt */
+	intel_de_rmw(display, DPST_GUARD(intel_crtc->pipe),

DPST_GUARD_HIST_INT_EN,

drivers/gpu/drm/i915/display/intel_histogram.c +6 -0
+		     DPST_GUARD_HIST_INT_EN);
+
+	/* Clear histogram interrupt by setting histogram interrupt status bit*/
+	intel_de_rmw(display, DPST_GUARD(intel_crtc->pipe),
+		     DPST_GUARD_HIST_EVENT_STATUS, 1); }
+

drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 102

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10 -0
+void intel_histogram_irq_handler(struct intel_display *display, enum
+pipe pipe) {
+	struct intel_crtc *intel_crtc =
+		to_intel_crtc(drm_crtc_from_index(display->drm, pipe));
+	struct intel_histogram *histogram = intel_crtc->histogram;
+	struct drm_i915_private *i915 = to_i915(intel_crtc->base.dev);
+
+	if (!histogram->enable) {
+		drm_err(display->drm,
+			"spurious interrupt, histogram not enabled\n");

Ditto.

Otherwise LGTM,

Quoted 102 lines
drivers/gpu/drm/i915/display/intel_histogram.c +8 -0
+		return;
+	}
+
+	queue_delayed_work(i915->unordered_wq,
+			   &histogram->work, 0);
+}
+
 int intel_histogram_atomic_check(struct intel_crtc *intel_crtc)  {
 	struct intel_histogram *histogram = intel_crtc->histogram; @@ -78,7
+156,7 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)
 		     DPST_GUARD_THRESHOLD_GB_MASK |
 		     DPST_GUARD_INTERRUPT_DELAY_MASK |

DPST_GUARD_HIST_INT_EN,

drivers/gpu/drm/i915/display/intel_histogram.c +0 -1
 		     DPST_GUARD_THRESHOLD_GB(gbandthreshold) |
-

DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DELA
Y) |

drivers/gpu/drm/i915/display/intel_histogram.c +1 -0
+		     DPST_GUARD_INTERRUPT_DELAY(0x04) |
 		     DPST_GUARD_HIST_INT_EN);
 
 	/* Clear pending interrupts has to be done on separate write */ @@ -

111,6 +189,7 @@ static void intel_histogram_disable(struct intel_crtc *intel_crtc)

drivers/gpu/drm/i915/display/intel_histogram.c +5 -0
 	intel_de_rmw(display, DPST_CTL(pipe),
 		     DPST_CTL_IE_HIST_EN, 0);
 
+	cancel_delayed_work(&histogram->work);
 	histogram->enable = false;
 }
@@ -181,6 +260,7 @@ void intel_histogram_finish(struct intel_crtc
 *intel_crtc)  {
 	struct intel_histogram *histogram = intel_crtc->histogram;
 
+	cancel_delayed_work_sync(&histogram->work);
 	kfree(histogram);
 }
 
@@ -198,5 +278,8 @@ int intel_histogram_init(struct intel_crtc *intel_crtc)
 	histogram->crtc = intel_crtc;
 	histogram->can_enable = false;
 
+	INIT_DEFERRABLE_WORK(&histogram->work,
+			     intel_histogram_handle_int_work);
+
 	return 0;
 }
drivers/gpu/drm/i915/display/intel_histogram.h +4 -0
index fb01ffe8903f..d7ddaab7ef54 100644
@@ -10,6 +10,8 @@
 
 struct drm_property_blob;
 struct intel_crtc;
+struct intel_display;
+enum pipe;
 
 #define HISTOGRAM_BIN_COUNT                    32
 #define HISTOGRAM_IET_LENGTH                   33
@@ -28,6 +30,7 @@ enum intel_global_hist_lut {  };
 
 int intel_histogram_atomic_check(struct intel_crtc *intel_crtc);
+void intel_histogram_irq_handler(struct intel_display *display, enum
+pipe pipe);
 int intel_histogram_update(struct intel_crtc *intel_crtc, bool enable);  int
 intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
 				struct drm_property_blob *blob);
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f48b5c809cec..836602e47511 100644

drivers/gpu/drm/i915/i915_reg.h +3 -3
@@ -1605,7 +1605,7 @@
 #define   PIPE_HOTPLUG_INTERRUPT_ENABLE		(1UL << 26)
 #define   PIPE_VSYNC_INTERRUPT_ENABLE		(1UL << 25)
 #define   PIPE_DISPLAY_LINE_COMPARE_ENABLE	(1UL << 24)
-#define   PIPE_DPST_EVENT_ENABLE		(1UL << 23)
+#define   PIPE_HISTOGRAM_EVENT_ENABLE		(1UL << 23)
 #define   SPRITE0_FLIP_DONE_INT_EN_VLV		(1UL << 22)
 #define   PIPE_LEGACY_BLC_EVENT_ENABLE		(1UL << 22)
 #define   PIPE_ODD_FIELD_INTERRUPT_ENABLE	(1UL << 21)
@@ -1628,7 +1628,7 @@
 #define   PIPE_HOTPLUG_INTERRUPT_STATUS		(1UL << 10)
 #define   PIPE_VSYNC_INTERRUPT_STATUS		(1UL << 9)
 #define   PIPE_DISPLAY_LINE_COMPARE_STATUS	(1UL << 8)
-#define   PIPE_DPST_EVENT_STATUS		(1UL << 7)
+#define   PIPE_HISTOGRAM_EVENT_STATUS		(1UL << 7)
 #define   PIPE_A_PSR_STATUS_VLV			(1UL << 6)
 #define   PIPE_LEGACY_BLC_EVENT_STATUS		(1UL << 6)
 #define   PIPE_ODD_FIELD_INTERRUPT_STATUS	(1UL << 5)
@@ -2470,6 +2470,7 @@
 #define  GEN12_DSB_1_INT		REG_BIT(14) /* tgl+ */
 #define  GEN12_DSB_0_INT		REG_BIT(13) /* tgl+ */
 #define  GEN12_DSB_INT(dsb_id)		REG_BIT(13 + (dsb_id))
+#define  GEN9_PIPE_HISTOGRAM_EVENT	REG_BIT(12) /* skl+ */
 #define  GEN9_PIPE_CURSOR_FAULT		REG_BIT(11) /* skl+ */
 #define  GEN9_PIPE_PLANE4_FAULT		REG_BIT(10) /* skl+ */
 #define  GEN8_PIPE_CURSOR_FAULT		REG_BIT(10) /* bdw */
--

2.25.1

#11 lore raw

PATCH v9 7/10 drm/i915/display: handle drm-crtc histogram property updates

In reply to Arun R Murthy

Check for any updates on drm_crtc property histogram_enable and histogram_iet_updated and call/act accordingly to update histogram or update the image enhancement LUT data API defined in i915 histogram.

---
 drivers/gpu/drm/i915/display/intel_atomic.c   |  1 +
 drivers/gpu/drm/i915/display/intel_crtc.c     |  7 +++++++
 drivers/gpu/drm/i915/display/intel_display.c  | 17 ++++++++++++++++
 .../drm/i915/display/intel_display_types.h    |  2 ++
 .../gpu/drm/i915/display/intel_histogram.c    | 20 +++++++++++++++++++
 5 files changed, 47 insertions(+)
drivers/gpu/drm/i915/display/intel_atomic.c +1 -0
index 03dc54c802d3..dff130b3565a 100644
@@ -278,6 +278,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)
 	crtc_state->dsb_color_vblank = NULL;
 	crtc_state->dsb_commit = NULL;
 	crtc_state->use_dsb = false;
+	crtc_state->histogram_updated = false;
 
 	return &crtc_state->uapi;
 }
drivers/gpu/drm/i915/display/intel_crtc.c +7 -0
index a2c528d707f4..0c8741ca9a71 100644
@@ -27,6 +27,7 @@
 #include "intel_drrs.h"
 #include "intel_dsi.h"
 #include "intel_fifo_underrun.h"
+#include "intel_histogram.h"
 #include "intel_pipe_crc.h"
 #include "intel_psr.h"
 #include "intel_sprite.h"
@@ -210,6 +211,7 @@ static struct intel_crtc *intel_crtc_alloc(void)
 static void intel_crtc_free(struct intel_crtc *crtc)
 {
 	intel_crtc_destroy_state(&crtc->base, crtc->base.state);
+	intel_histogram_finish(crtc);
 	kfree(crtc);
 }
 
@@ -380,10 +382,15 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
 						BIT(DRM_SCALING_FILTER_DEFAULT) |
 						BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
 
+	if (drm_crtc_create_histogram_property(&crtc->base))
+		drm_err(&dev_priv->drm, "Failed to initialize histogram properties\n");
+
 	intel_color_crtc_init(crtc);
 	intel_drrs_crtc_init(crtc);
 	intel_crtc_crc_init(crtc);
 
+	intel_histogram_init(crtc);
+
 	cpu_latency_qos_add_request(&crtc->vblank_pm_qos, PM_QOS_DEFAULT_VALUE);
 
 	drm_WARN_ON(&dev_priv->drm, drm_crtc_index(&crtc->base) != crtc->pipe);
drivers/gpu/drm/i915/display/intel_display.c +17 -0
index 9db255bb1230..eeeb59fb39c0 100644
@@ -93,6 +93,7 @@
 #include "intel_fifo_underrun.h"
 #include "intel_frontbuffer.h"
 #include "intel_hdmi.h"
+#include "intel_histogram.h"
 #include "intel_hotplug.h"
 #include "intel_link_bw.h"
 #include "intel_lvds.h"
@@ -4612,6 +4613,12 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
 	if (ret)
 		return ret;
 
+	if (crtc_state->histogram_updated) {
+		ret = intel_histogram_atomic_check(crtc);
+		if (ret)
+			return ret;
+	}
+
 	return 0;
 }
 
@@ -6831,6 +6838,10 @@ int intel_atomic_check(struct drm_device *dev,
 		if (new_crtc_state->uapi.scaling_filter !=
 		    old_crtc_state->uapi.scaling_filter)
 			new_crtc_state->uapi.mode_changed = true;
+
+		if (new_crtc_state->uapi.histogram_enable |=
+				old_crtc_state->uapi.histogram_enable)
+			new_crtc_state->histogram_updated = true;
 	}
 
 	intel_vrr_check_modeset(state);
@@ -7897,6 +7908,12 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
 		 */
 		old_crtc_state->dsb_color_vblank = fetch_and_zero(&new_crtc_state->dsb_color_vblank);
 		old_crtc_state->dsb_commit = fetch_and_zero(&new_crtc_state->dsb_commit);
+
+		if (new_crtc_state->histogram_updated)
+			intel_histogram_update(crtc, crtc->base.state->histogram_enable);
+		if (new_crtc_state->uapi.histogram_iet_updated)
+			intel_histogram_set_iet_lut(crtc,
+						    new_crtc_state->uapi.histogram_iet);
 	}
 
 	/* Underruns don't always raise interrupts, so check manually */
drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
index 351441efd10a..2e8640e84e7c 100644
@@ -1306,6 +1306,8 @@ struct intel_crtc_state {
 
 	/* LOBF flag */
 	bool has_lobf;
+
+	bool histogram_updated;
 };
 
 enum intel_pipe_crc_source {
drivers/gpu/drm/i915/display/intel_histogram.c +20 -0
index 57bb45b36a03..8f25cfe00ba5 100644
@@ -68,6 +68,26 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
 		     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0);
 	for (retry = 0; retry < HISTOGRAM_BIN_READ_RETRY_COUNT; retry++) {
 		if (intel_histogram_get_data(intel_crtc)) {
+			u32 *data;
+			u32 size;
+			struct drm_histogram *hist;
+
+			size = sizeof(u32) * sizeof(histogram->bin_data);
+			data = kzalloc(sizeof(data) * sizeof(histogram->bin_data), GFP_KERNEL);
+			if (!data)
+				return;
+			memcpy(histogram->bin_data, data, size);
+			hist = kzalloc(sizeof(struct drm_histogram), GFP_KERNEL);
+			if (!hist)
+				return;
+			hist->data_ptr = *data;
+			hist->nr_elements = sizeof(histogram->bin_data);
+
+			drm_property_replace_global_blob(display->drm,
+				&intel_crtc->base.state->histogram_data,
+				sizeof(struct drm_histogram),
+				hist, &intel_crtc->base.base,
+				intel_crtc->base.histogram_data_property);
 			/* Notify user for Histogram rediness */
 			if (kobject_uevent_env(&display->drm->primary->kdev->kobj,
 					       KOBJ_CHANGE, histogram_event))
Signature · 1 line
2.25.1
#12 lore raw

RE: [PATCH 07/10] drm/i915/display: handle drm-crtc histogram property updates

Quoted 12 lines

-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Arun R Murthy
Sent: Tuesday, December 3, 2024 11:25 AM
To: [email protected]; [email protected]; dri- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCH 07/10] drm/i915/display: handle drm-crtc histogram property updates

Quoted 3 lines

Check for any updates on drm_crtc property histogram_enable and histogram_iet_updated and call/act accordingly to update histogram or update the image enhancement LUT data API defined in i915 histogram.

Mostly looks good to me a little Nits here and there First would prefer to have the subject as "*Handle drm-crtc ...."

Quoted 91 lines
---
 drivers/gpu/drm/i915/display/intel_atomic.c   |  1 +
 drivers/gpu/drm/i915/display/intel_crtc.c     |  7 +++++++
 drivers/gpu/drm/i915/display/intel_display.c  | 17 ++++++++++++++++
 .../drm/i915/display/intel_display_types.h    |  2 ++
 .../gpu/drm/i915/display/intel_histogram.c    | 20 +++++++++++++++++++
 5 files changed, 47 insertions(+)
drivers/gpu/drm/i915/display/intel_atomic.c +1 -0
index 03dc54c802d3..dff130b3565a 100644
@@ -278,6 +278,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)
 	crtc_state->dsb_color_vblank = NULL;
 	crtc_state->dsb_commit = NULL;
 	crtc_state->use_dsb = false;
+	crtc_state->histogram_updated = false;
 
 	return &crtc_state->uapi;
 }
drivers/gpu/drm/i915/display/intel_crtc.c +8 -0
index a2c528d707f4..0c8741ca9a71 100644
@@ -27,6 +27,7 @@
 #include "intel_drrs.h"
 #include "intel_dsi.h"
 #include "intel_fifo_underrun.h"
+#include "intel_histogram.h"
 #include "intel_pipe_crc.h"
 #include "intel_psr.h"
 #include "intel_sprite.h"
@@ -210,6 +211,7 @@ static struct intel_crtc *intel_crtc_alloc(void)  static
 void intel_crtc_free(struct intel_crtc *crtc)  {
 	intel_crtc_destroy_state(&crtc->base, crtc->base.state);
+	intel_histogram_finish(crtc);
 	kfree(crtc);
 }
 
@@ -380,10 +382,15 @@ int intel_crtc_init(struct drm_i915_private
 *dev_priv, enum pipe pipe)
 
 	BIT(DRM_SCALING_FILTER_DEFAULT) |
 
 	BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
 
+	if (drm_crtc_create_histogram_property(&crtc->base))
+		drm_err(&dev_priv->drm, "Failed to initialize histogram
+properties\n");
+
 	intel_color_crtc_init(crtc);
 	intel_drrs_crtc_init(crtc);
 	intel_crtc_crc_init(crtc);
 
+	intel_histogram_init(crtc);
+
 	cpu_latency_qos_add_request(&crtc->vblank_pm_qos,

PM_QOS_DEFAULT_VALUE);

drm_WARN_ON(&dev_priv->drm, drm_crtc_index(&crtc->base) !=
crtc->pipe); diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 9db255bb1230..eeeb59fb39c0 100644

drivers/gpu/drm/i915/display/intel_display.c +7 -0
@@ -93,6 +93,7 @@
 #include "intel_fifo_underrun.h"
 #include "intel_frontbuffer.h"
 #include "intel_hdmi.h"
+#include "intel_histogram.h"
 #include "intel_hotplug.h"
 #include "intel_link_bw.h"
 #include "intel_lvds.h"
@@ -4612,6 +4613,12 @@ static int intel_crtc_atomic_check(struct
 intel_atomic_state *state,
 	if (ret)
 		return ret;
 
+	if (crtc_state->histogram_updated) {
+		ret = intel_histogram_atomic_check(crtc);
+		if (ret)
+			return ret;
+	}
+
 	return 0;
 }

drivers/gpu/drm/i915/display/intel_display.c int intel_atomic_check(struct drm_device *dev, · line 6843

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +3 -0
@@ -6831,6 +6838,10 @@ int intel_atomic_check(struct drm_device *dev,
 		if (new_crtc_state->uapi.scaling_filter !=
 		    old_crtc_state->uapi.scaling_filter)
 			new_crtc_state->uapi.mode_changed = true;
+
+		if (new_crtc_state->uapi.histogram_enable |=
+				old_crtc_state->uapi.histogram_enable)

Shouldn't this aligned with the state brackets

Quoted 60 lines
drivers/gpu/drm/i915/display/intel_display.c +4 -0
+			new_crtc_state->histogram_updated = true;
 	}
 
 	intel_vrr_check_modeset(state);
@@ -7897,6 +7908,12 @@ static void intel_atomic_commit_tail(struct
 intel_atomic_state *state)
 		 */
 		old_crtc_state->dsb_color_vblank =
 fetch_and_zero(&new_crtc_state->dsb_color_vblank);
 		old_crtc_state->dsb_commit =
 fetch_and_zero(&new_crtc_state->dsb_commit);
+
+		if (new_crtc_state->histogram_updated)
+			intel_histogram_update(crtc, crtc->base.state-
Quoted 1 line

histogram_enable);

drivers/gpu/drm/i915/display/intel_display.c +3 -0
+		if (new_crtc_state->uapi.histogram_iet_updated)
+			intel_histogram_set_iet_lut(crtc,
+						    new_crtc_state-
Quoted 1 line

uapi.histogram_iet);

drivers/gpu/drm/i915/display/intel_display.c +0 -1
 	}
 
 	/* Underruns don't always raise interrupts, so check manually */ diff -
-git a/drivers/gpu/drm/i915/display/intel_display_types.h

b/drivers/gpu/drm/i915/display/intel_display_types.h index 351441efd10a..2e8640e84e7c 100644

drivers/gpu/drm/i915/display/intel_display_types.h +2 -0
@@ -1306,6 +1306,8 @@ struct intel_crtc_state {
 
 	/* LOBF flag */
 	bool has_lobf;
+
+	bool histogram_updated;
 };
 
 enum intel_pipe_crc_source {
drivers/gpu/drm/i915/display/intel_histogram.c +6 -0
index 57bb45b36a03..8f25cfe00ba5 100644
@@ -68,6 +68,26 @@ static void intel_histogram_handle_int_work(struct
 work_struct *work)
 		     DPST_CTL_BIN_REG_FUNC_SEL |
 DPST_CTL_BIN_REG_MASK, 0);
 	for (retry = 0; retry < HISTOGRAM_BIN_READ_RETRY_COUNT; retry++)
 {
 		if (intel_histogram_get_data(intel_crtc)) {
+			u32 *data;
+			u32 size;
+			struct drm_histogram *hist;
+
+			size = sizeof(u32) * sizeof(histogram->bin_data);
+			data = kzalloc(sizeof(data) * sizeof(histogram-
Quoted 1 line

bin_data), GFP_KERNEL);

drivers/gpu/drm/i915/display/intel_histogram.c +4 -0
+			if (!data)
+				return;
+			memcpy(histogram->bin_data, data, size);
+			hist = kzalloc(sizeof(struct drm_histogram),

GFP_KERNEL);

drivers/gpu/drm/i915/display/intel_histogram.c static void intel_histogram_handle_int_work(struct work_struct *work) · line 90

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10 -0
+			if (!hist)
+				return;
+			hist->data_ptr = *data;
+			hist->nr_elements = sizeof(histogram->bin_data);
+
+			drm_property_replace_global_blob(display->drm,
+				&intel_crtc->base.state->histogram_data,
+				sizeof(struct drm_histogram),
+				hist, &intel_crtc->base.base,
+				intel_crtc->base.histogram_data_property);

Can we move this into a single function then call it would it look neater ?

Regards,
Suraj Kandpal

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0 -0
 			/* Notify user for Histogram rediness */
 			if (kobject_uevent_env(&display->drm->primary-
Quoted 1 line

kdev->kobj,

KOBJ_CHANGE, histogram_event))
--
2.25.1

#13 lore raw

PATCH v3 8/10 drm/i915/histogram: histogram delay counter doesnt reset

In reply to Arun R Murthy

The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Workaround would be to use save and restore histogram register.

v2: Follow the seq in interrupt handler
Restore DPST bit 0
read/write dpst ctl rg
Restore DPST bit 1 and Guardband Delay Interrupt counter = 0 (Suraj)
v3: updated wa version for display 13 and 14

Wa: 14014889975

---
 drivers/gpu/drm/i915/display/intel_histogram.c     | 14 ++++++++++++++
 .../gpu/drm/i915/display/intel_histogram_regs.h    |  2 ++
 2 files changed, 16 insertions(+)
drivers/gpu/drm/i915/display/intel_histogram.c +14 -0
index 8f25cfe00ba5..66006b75efaa 100644
@@ -59,6 +59,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
 	snprintf(pipe_id, sizeof(pipe_id),
 		 "PIPE=%u", intel_crtc->base.base.id);
 
+	/* Wa: 14014889975 */
+	if (IS_DISPLAY_VER(display, 13, 14))
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_RESTORE, 0);
+
 	/*
 	 * TODO: PSR to be exited while reading the Histogram data
 	 * Set DPST_CTL Bin Reg function select to TC
@@ -101,6 +106,15 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
 		return;
 	}
 
+	/* Wa: 14014889975 */
+	if (IS_DISPLAY_VER(display, 13, 14))
+		/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT |
+			     DPST_CTL_RESTORE,
+			     DPST_CTL_GUARDBAND_INTERRUPT_DELAY(0x0) |
+			     DPST_CTL_RESTORE);
+
 	/* Enable histogram interrupt */
 	intel_de_rmw(display, DPST_GUARD(intel_crtc->pipe), DPST_GUARD_HIST_INT_EN,
 		     DPST_GUARD_HIST_INT_EN);
drivers/gpu/drm/i915/display/intel_histogram_regs.h +2 -0
index 1252b4f339a6..213c9f483567 100644
@@ -16,6 +16,8 @@
 #define  DPST_CTL_RESTORE				REG_BIT(28)
 #define  DPST_CTL_IE_MODI_TABLE_EN			REG_BIT(27)
 #define  DPST_CTL_HIST_MODE				REG_BIT(24)
+#define  DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT		REG_GENMASK(23, 16)
+#define  DPST_CTL_GUARDBAND_INTERRUPT_DELAY(val)	REG_FIELD_PREP(DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT, val)
 #define  DPST_CTL_ENHANCEMENT_MODE_MASK			REG_GENMASK(14, 13)
 #define  DPST_CTL_EN_MULTIPLICATIVE			REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
 #define  DPST_CTL_IE_TABLE_VALUE_FORMAT			REG_BIT(15)
Signature · 1 line
2.25.1
Reviewed-by on v3 8/10
#14 lore raw

RE: [PATCHv3 08/10] drm/i915/histogram: histogram delay counter doesnt reset

Quoted 16 lines

-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Arun R Murthy
Sent: Tuesday, December 3, 2024 11:25 AM
To: [email protected]; [email protected]; dri- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv3 08/10] drm/i915/histogram: histogram delay counter doesnt reset

The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Workaround would be to use save and restore histogram register.

Quoted 8 lines

v2: Follow the seq in interrupt handler
Restore DPST bit 0
read/write dpst ctl rg
Restore DPST bit 1 and Guardband Delay Interrupt counter = 0 (Suraj)
v3: updated wa version for display 13 and 14

Wa: 14014889975

LGTM,

Quoted 63 lines
---
 drivers/gpu/drm/i915/display/intel_histogram.c     | 14 ++++++++++++++
 .../gpu/drm/i915/display/intel_histogram_regs.h    |  2 ++
 2 files changed, 16 insertions(+)
drivers/gpu/drm/i915/display/intel_histogram.c +5 -0
index 8f25cfe00ba5..66006b75efaa 100644
@@ -59,6 +59,11 @@ static void intel_histogram_handle_int_work(struct
 work_struct *work)
 	snprintf(pipe_id, sizeof(pipe_id),
 		 "PIPE=%u", intel_crtc->base.base.id);
 
+	/* Wa: 14014889975 */
+	if (IS_DISPLAY_VER(display, 13, 14))
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_RESTORE, 0);
+
 	/*
 	 * TODO: PSR to be exited while reading the Histogram data

* Set DPST_CTL Bin Reg function select to TC @@ -101,6 +106,15 @@
static void intel_histogram_handle_int_work(struct work_struct *work)

drivers/gpu/drm/i915/display/intel_histogram.c +3 -0
 		return;
 	}
 
+	/* Wa: 14014889975 */
+	if (IS_DISPLAY_VER(display, 13, 14))
+		/* Write the value read from DPST_CTL to DPST_CTL.Interrupt

Delay Counter(bit 23:16) */

drivers/gpu/drm/i915/display/intel_histogram.c +6 -0
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT |
+			     DPST_CTL_RESTORE,
+			     DPST_CTL_GUARDBAND_INTERRUPT_DELAY(0x0) |
+			     DPST_CTL_RESTORE);
+
 	/* Enable histogram interrupt */
 	intel_de_rmw(display, DPST_GUARD(intel_crtc->pipe),

DPST_GUARD_HIST_INT_EN,

drivers/gpu/drm/i915/display/intel_histogram.c +0 -0
 		     DPST_GUARD_HIST_INT_EN);
drivers/gpu/drm/i915/display/intel_histogram_regs.h +2 -0
index 1252b4f339a6..213c9f483567 100644
@@ -16,6 +16,8 @@
 #define  DPST_CTL_RESTORE				REG_BIT(28)
 #define  DPST_CTL_IE_MODI_TABLE_EN			REG_BIT(27)
 #define  DPST_CTL_HIST_MODE				REG_BIT(24)
+#define  DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT
 	REG_GENMASK(23, 16)
+#define  DPST_CTL_GUARDBAND_INTERRUPT_DELAY(val)
 	REG_FIELD_PREP(DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT,
 val)
 #define  DPST_CTL_ENHANCEMENT_MODE_MASK
	REG_GENMASK(14, 13)

#define DPST_CTL_EN_MULTIPLICATIVE
REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
#define DPST_CTL_IE_TABLE_VALUE_FORMAT REG_BIT(15)
--
2.25.1

#15 lore raw

PATCH v6 9/10 drm/i915/histogram: Histogram changes for Display 20+

In reply to Arun R Murthy

In Display 20+, new registers are added for setting index, reading histogram and writing the IET.

v2: Removed duplicate code (Jani)
v3: Moved histogram core changes to earlier patches (Jani/Suraj)
v4: Rebased after addressing comments on patch 1
v5: Added the retry logic from patch3 and rebased the patch series
v6: optimize wite_iet() (Suraj)

Bspec: 68895

---
 .../gpu/drm/i915/display/intel_histogram.c    | 105 +++++++++++++-----
 .../drm/i915/display/intel_histogram_regs.h   |  25 +++++
 2 files changed, 103 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/display/intel_histogram.c +78 -27
index 66006b75efaa..48495480107e 100644
@@ -29,6 +29,37 @@ struct intel_histogram {
 	u32 bin_data[HISTOGRAM_BIN_COUNT];
 };
 
+static void set_bin_index_0(struct intel_display *display, enum pipe pipe)
+{
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_IE_INDEX(pipe),
+			     DPST_IE_BIN_INDEX_MASK, DPST_IE_BIN_INDEX(0));
+	else
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_MASK,
+			     DPST_CTL_BIN_REG_CLEAR);
+}
+
+static void write_iet(struct intel_display *display, enum pipe pipe,
+			      u32 *data)
+{
+	int i;
+
+	for (i = 0; i < HISTOGRAM_IET_LENGTH; i++) {
+		if (DISPLAY_VER(display) >= 20)
+			intel_de_rmw(display, DPST_IE_BIN(pipe),
+				     DPST_IE_BIN_DATA_MASK,
+				     DPST_IE_BIN_DATA(data[i]));
+		else
+			intel_de_rmw(display, DPST_BIN(pipe),
+				     DPST_BIN_DATA_MASK,
+				     DPST_BIN_DATA(data[i]));
+
+		drm_dbg_atomic(display->drm, "iet_lut[%d]=%x\n",
+			       i, data[i]);
+	}
+}
+
 static bool intel_histogram_get_data(struct intel_crtc *intel_crtc)
 {
 	struct intel_display *display = to_intel_display(intel_crtc);
@@ -36,12 +67,27 @@ static bool intel_histogram_get_data(struct intel_crtc *intel_crtc)
 	int index;
 	u32 dpstbin;
 
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_HIST_INDEX(intel_crtc->pipe),
+			     DPST_HIST_BIN_INDEX_MASK,
+			     DPST_HIST_BIN_INDEX(0));
+	else
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0);
+
 	for (index = 0; index < ARRAY_SIZE(histogram->bin_data); index++) {
-		dpstbin = intel_de_read(display, DPST_BIN(intel_crtc->pipe));
+		dpstbin = intel_de_read(display, (DISPLAY_VER(display) >= 20 ?
+					DPST_HIST_BIN(intel_crtc->pipe) :
+					DPST_BIN(intel_crtc->pipe)));
 		if (!(dpstbin & DPST_BIN_BUSY)) {
-			histogram->bin_data[index] = dpstbin & DPST_BIN_DATA_MASK;
-		} else
+			histogram->bin_data[index] = dpstbin & (DISPLAY_VER(display) >= 20 ?
+								DPST_HIST_BIN_DATA_MASK :
+								DPST_BIN_DATA_MASK);
+		} else {
+			drm_err(display->drm, "Histogram bin busy, retyring\n");
+			fsleep(2);
 			return false;
+		}
 	}
 	return true;
 }
@@ -69,8 +115,6 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
 	 * Set DPST_CTL Bin Reg function select to TC
 	 * Set DPST_CTL Bin Register Index to 0
 	 */
-	intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0);
 	for (retry = 0; retry < HISTOGRAM_BIN_READ_RETRY_COUNT; retry++) {
 		if (intel_histogram_get_data(intel_crtc)) {
 			u32 *data;
@@ -165,15 +209,26 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)
 	if (histogram->enable)
 		return 0;
 
-	 /* enable histogram, clear DPST_CTL bin reg func select to TC */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_IE_HIST_EN |
-		     DPST_CTL_HIST_MODE | DPST_CTL_IE_TABLE_VALUE_FORMAT |
-		     DPST_CTL_ENHANCEMENT_MODE_MASK | DPST_CTL_IE_MODI_TABLE_EN,
-		     DPST_CTL_BIN_REG_FUNC_TC | DPST_CTL_IE_HIST_EN |
-		     DPST_CTL_HIST_MODE_HSV |
-		     DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC |
-		     DPST_CTL_EN_MULTIPLICATIVE | DPST_CTL_IE_MODI_TABLE_EN);
+	 /* enable histogram, clear DPST_BIN reg and select TC function */
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE,
+			     DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE_HSV);
+	else
+		 /* enable histogram, clear DPST_BIN reg and select TC function */
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE |
+			     DPST_CTL_IE_TABLE_VALUE_FORMAT |
+			     DPST_CTL_ENHANCEMENT_MODE_MASK |
+			     DPST_CTL_IE_MODI_TABLE_EN,
+			     DPST_CTL_BIN_REG_FUNC_TC | DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE_HSV |
+			     DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC |
+			     DPST_CTL_EN_MULTIPLICATIVE |
+			     DPST_CTL_IE_MODI_TABLE_EN);
 
 	/* Re-Visit: check if wait for one vblank is required */
 	drm_crtc_wait_one_vblank(&intel_crtc->base);
@@ -242,7 +297,6 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
 	struct intel_histogram *histogram = intel_crtc->histogram;
 	struct intel_display *display = to_intel_display(intel_crtc);
 	int pipe = intel_crtc->pipe;
-	int i = 0;
 	struct drm_histogram *hist;
 	u32 *data;
 	int ret;
@@ -260,15 +314,15 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
 		return -EINVAL;
 	}
 
-	/* Set DPST_CTL Bin Reg function select to IE & wait for a vblabk */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL, DPST_CTL_BIN_REG_FUNC_IE);
 
-	drm_crtc_wait_one_vblank(&intel_crtc->base);
+	if (DISPLAY_VER(display) < 20) {
+		/* Set DPST_CTL Bin Reg function select to IE & wait for a vblabk */
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL,
+			     DPST_CTL_BIN_REG_FUNC_IE);
+	}
 
-	 /* Set DPST_CTL Bin Register Index to 0 */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_MASK, DPST_CTL_BIN_REG_CLEAR);
+	set_bin_index_0(display, pipe);
 
 	hist = (struct drm_histogram *)blob->data;
 	data = kzalloc(sizeof(data) * hist->nr_elements, GFP_KERNEL);
@@ -279,11 +333,8 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,
 	if (ret)
 		return ret;
 
-	for (i = 0; i < HISTOGRAM_IET_LENGTH; i++) {
-		intel_de_rmw(display, DPST_BIN(pipe),
-			     DPST_BIN_DATA_MASK, data[i]);
-		drm_dbg_atomic(display->drm, "iet_lut[%d]=%x\n", i, data[i]);
-	}
+	write_iet(display, pipe, data);
+
 	kfree(data);
 	drm_property_blob_put(intel_crtc->base.state->histogram_iet);
 
drivers/gpu/drm/i915/display/intel_histogram_regs.h +25 -0
index 213c9f483567..3fbb9c2deaae 100644
@@ -45,6 +45,31 @@
 #define _DPST_BIN_B					0x491C4
 #define DPST_BIN(pipe)					_MMIO_PIPE(pipe, _DPST_BIN_A, _DPST_BIN_B)
 #define  DPST_BIN_DATA_MASK				REG_GENMASK(23, 0)
+#define  DPST_BIN_DATA(val)				REG_FIELD_PREP(DPST_BIN_DATA_MASK, val)
 #define  DPST_BIN_BUSY					REG_BIT(31)
 
+#define _DPST_HIST_INDEX_A				0x490D8
+#define _DPST_HIST_INDEX_B				0x491D8
+#define DPST_HIST_INDEX(pipe)				_MMIO_PIPE(pipe, _DPST_HIST_INDEX_A, _DPST_HIST_INDEX_B)
+#define  DPST_HIST_BIN_INDEX_MASK			REG_GENMASK(4, 0)
+#define  DPST_HIST_BIN_INDEX(val)			REG_FIELD_PREP(DPST_HIST_BIN_INDEX_MASK, val)
+
+#define _DPST_HIST_BIN_A				0x490C4
+#define _DPST_HIST_BIN_B				0x491C4
+#define DPST_HIST_BIN(pipe)				_MMIO_PIPE(pipe, _DPST_HIST_BIN_A, _DPST_HIST_BIN_B)
+#define  DPST_HIST_BIN_BUSY				REG_BIT(31)
+#define  DPST_HIST_BIN_DATA_MASK				REG_GENMASK(30, 0)
+
+#define _DPST_IE_BIN_A					0x490CC
+#define _DPST_IE_BIN_B					0x491CC
+#define DPST_IE_BIN(pipe)				_MMIO_PIPE(pipe, _DPST_IE_BIN_A, _DPST_IE_BIN_B)
+#define	 DPST_IE_BIN_DATA_MASK				REG_GENMASK(9, 0)
+#define  DPST_IE_BIN_DATA(val)				REG_FIELD_PREP(DPST_IE_BIN_DATA_MASK, val)
+
+#define _DPST_IE_INDEX_A				0x490DC
+#define _DPST_IE_INDEX_B				0x491DC
+#define DPST_IE_INDEX(pipe)				_MMIO_PIPE(pipe, _DPST_IE_INDEX_A, _DPST_IE_INDEX_B)
+#define  DPST_IE_BIN_INDEX_MASK				REG_GENMASK(6, 0)
+#define  DPST_IE_BIN_INDEX(val)				REG_FIELD_PREP(DPST_IE_BIN_INDEX_MASK, val)
+
 #endif /* __INTEL_HISTOGRAM_REGS_H__ */
Signature · 1 line
2.25.1
Reviewed-by on v6 9/10
#16 lore raw

RE: [PATCHv6 09/10] drm/i915/histogram: Histogram changes for Display 20+

Quoted 15 lines

-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Arun R Murthy
Sent: Tuesday, December 3, 2024 11:25 AM
To: [email protected]; [email protected]; dri- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv6 09/10] drm/i915/histogram: Histogram changes for Display 20+

In Display 20+, new registers are added for setting index, reading histogram and writing the IET.

Quoted 8 lines

v2: Removed duplicate code (Jani)
v3: Moved histogram core changes to earlier patches (Jani/Suraj)
v4: Rebased after addressing comments on patch 1
v5: Added the retry logic from patch3 and rebased the patch series
v6: optimize wite_iet() (Suraj)

Bspec: 68895

LGTM,

Quoted 245 lines
---
 .../gpu/drm/i915/display/intel_histogram.c    | 105 +++++++++++++-----
 .../drm/i915/display/intel_histogram_regs.h   |  25 +++++
 2 files changed, 103 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/display/intel_histogram.c +39 -0
index 66006b75efaa..48495480107e 100644
@@ -29,6 +29,37 @@ struct intel_histogram {
 	u32 bin_data[HISTOGRAM_BIN_COUNT];
 };
 
+static void set_bin_index_0(struct intel_display *display, enum pipe
+pipe) {
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_IE_INDEX(pipe),
+			     DPST_IE_BIN_INDEX_MASK,
 DPST_IE_BIN_INDEX(0));
+	else
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_MASK,
+			     DPST_CTL_BIN_REG_CLEAR);
+}
+
+static void write_iet(struct intel_display *display, enum pipe pipe,
+			      u32 *data)
+{
+	int i;
+
+	for (i = 0; i < HISTOGRAM_IET_LENGTH; i++) {
+		if (DISPLAY_VER(display) >= 20)
+			intel_de_rmw(display, DPST_IE_BIN(pipe),
+				     DPST_IE_BIN_DATA_MASK,
+				     DPST_IE_BIN_DATA(data[i]));
+		else
+			intel_de_rmw(display, DPST_BIN(pipe),
+				     DPST_BIN_DATA_MASK,
+				     DPST_BIN_DATA(data[i]));
+
+		drm_dbg_atomic(display->drm, "iet_lut[%d]=%x\n",
+			       i, data[i]);
+	}
+}
+
 static bool intel_histogram_get_data(struct intel_crtc *intel_crtc)  {
 	struct intel_display *display = to_intel_display(intel_crtc); @@ -36,12
+67,27 @@ static bool intel_histogram_get_data(struct intel_crtc *intel_crtc)
 	int index;
 	u32 dpstbin;
 
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_HIST_INDEX(intel_crtc->pipe),
+			     DPST_HIST_BIN_INDEX_MASK,
+			     DPST_HIST_BIN_INDEX(0));
+	else
+		intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL |

DPST_CTL_BIN_REG_MASK, 0);

drivers/gpu/drm/i915/display/intel_histogram.c +2 -1
+
 	for (index = 0; index < ARRAY_SIZE(histogram->bin_data); index++) {
-		dpstbin = intel_de_read(display, DPST_BIN(intel_crtc->pipe));
+		dpstbin = intel_de_read(display, (DISPLAY_VER(display) >= 20

?

drivers/gpu/drm/i915/display/intel_histogram.c +2 -1
+					DPST_HIST_BIN(intel_crtc->pipe) :
+					DPST_BIN(intel_crtc->pipe)));
 		if (!(dpstbin & DPST_BIN_BUSY)) {
-			histogram->bin_data[index] = dpstbin &

DPST_BIN_DATA_MASK;

drivers/gpu/drm/i915/display/intel_histogram.c +1 -1
-		} else
+			histogram->bin_data[index] = dpstbin &

(DISPLAY_VER(display) >= 20 ?
+
DPST_HIST_BIN_DATA_MASK :
+

	DPST_BIN_DATA_MASK);
drivers/gpu/drm/i915/display/intel_histogram.c +2 -0
+		} else {
+			drm_err(display->drm, "Histogram bin busy,

retyring\n");

drivers/gpu/drm/i915/display/intel_histogram.c +2 -2
+			fsleep(2);
 			return false;
+		}
 	}
 	return true;
 }
@@ -69,8 +115,6 @@ static void intel_histogram_handle_int_work(struct
 work_struct *work)
 	 * Set DPST_CTL Bin Reg function select to TC
 	 * Set DPST_CTL Bin Register Index to 0
 	 */
-	intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL |
 DPST_CTL_BIN_REG_MASK, 0);
 	for (retry = 0; retry < HISTOGRAM_BIN_READ_RETRY_COUNT; retry++)

{

drivers/gpu/drm/i915/display/intel_histogram.c +0 -4
 		if (intel_histogram_get_data(intel_crtc)) {
 			u32 *data;
@@ -165,15 +209,26 @@ static int intel_histogram_enable(struct intel_crtc
 *intel_crtc)
 	if (histogram->enable)
 		return 0;
 
-	 /* enable histogram, clear DPST_CTL bin reg func select to TC */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_IE_HIST_EN |
-		     DPST_CTL_HIST_MODE |

DPST_CTL_IE_TABLE_VALUE_FORMAT |

drivers/gpu/drm/i915/display/intel_histogram.c +0 -1
-		     DPST_CTL_ENHANCEMENT_MODE_MASK |

DPST_CTL_IE_MODI_TABLE_EN,

drivers/gpu/drm/i915/display/intel_histogram.c +0 -4
-		     DPST_CTL_BIN_REG_FUNC_TC | DPST_CTL_IE_HIST_EN |
-		     DPST_CTL_HIST_MODE_HSV |
-		     DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC |
-		     DPST_CTL_EN_MULTIPLICATIVE |

DPST_CTL_IE_MODI_TABLE_EN);

drivers/gpu/drm/i915/display/intel_histogram.c +9 -0
+	 /* enable histogram, clear DPST_BIN reg and select TC function */
+	if (DISPLAY_VER(display) >= 20)
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE,
+			     DPST_CTL_IE_HIST_EN |
+			     DPST_CTL_HIST_MODE_HSV);
+	else
+		 /* enable histogram, clear DPST_BIN reg and select TC

function */

drivers/gpu/drm/i915/display/intel_histogram.c +2 -0
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL |

DPST_CTL_IE_HIST_EN |

drivers/gpu/drm/i915/display/intel_histogram.c +5 -0
+			     DPST_CTL_HIST_MODE |
+			     DPST_CTL_IE_TABLE_VALUE_FORMAT |
+			     DPST_CTL_ENHANCEMENT_MODE_MASK |
+			     DPST_CTL_IE_MODI_TABLE_EN,
+			     DPST_CTL_BIN_REG_FUNC_TC |

DPST_CTL_IE_HIST_EN |

drivers/gpu/drm/i915/display/intel_histogram.c +2 -0
+			     DPST_CTL_HIST_MODE_HSV |
+			     DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC

|

drivers/gpu/drm/i915/display/intel_histogram.c +2 -1
+			     DPST_CTL_EN_MULTIPLICATIVE |
+			     DPST_CTL_IE_MODI_TABLE_EN);
 
 	/* Re-Visit: check if wait for one vblank is required */
 	drm_crtc_wait_one_vblank(&intel_crtc->base);
@@ -242,7 +297,6 @@ int intel_histogram_set_iet_lut(struct intel_crtc
 *intel_crtc,
 	struct intel_histogram *histogram = intel_crtc->histogram;
 	struct intel_display *display = to_intel_display(intel_crtc);
 	int pipe = intel_crtc->pipe;
-	int i = 0;
 	struct drm_histogram *hist;
 	u32 *data;
drivers/gpu/drm/i915/display/intel_histogram.c +2 -4
 	int ret;
@@ -260,15 +314,15 @@ int intel_histogram_set_iet_lut(struct intel_crtc
 *intel_crtc,
 		return -EINVAL;
 	}
 
-	/* Set DPST_CTL Bin Reg function select to IE & wait for a vblabk */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_FUNC_SEL,
 DPST_CTL_BIN_REG_FUNC_IE);
 
-	drm_crtc_wait_one_vblank(&intel_crtc->base);
+	if (DISPLAY_VER(display) < 20) {
+		/* Set DPST_CTL Bin Reg function select to IE & wait for a

vblabk */

drivers/gpu/drm/i915/display/intel_histogram.c +5 -3
+		intel_de_rmw(display, DPST_CTL(pipe),
+			     DPST_CTL_BIN_REG_FUNC_SEL,
+			     DPST_CTL_BIN_REG_FUNC_IE);
+	}
 
-	 /* Set DPST_CTL Bin Register Index to 0 */
-	intel_de_rmw(display, DPST_CTL(pipe),
-		     DPST_CTL_BIN_REG_MASK, DPST_CTL_BIN_REG_CLEAR);
+	set_bin_index_0(display, pipe);
 
 	hist = (struct drm_histogram *)blob->data;
 	data = kzalloc(sizeof(data) * hist->nr_elements, GFP_KERNEL); @@ -

279,11 +333,8 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc,

drivers/gpu/drm/i915/display/intel_histogram.c +0 -4
 	if (ret)
 		return ret;
 
-	for (i = 0; i < HISTOGRAM_IET_LENGTH; i++) {
-		intel_de_rmw(display, DPST_BIN(pipe),
-			     DPST_BIN_DATA_MASK, data[i]);
-		drm_dbg_atomic(display->drm, "iet_lut[%d]=%x\n", i,

data[i]);

drivers/gpu/drm/i915/display/intel_histogram.c +2 -1
-	}
+	write_iet(display, pipe, data);
+
 	kfree(data);
 	drm_property_blob_put(intel_crtc->base.state->histogram_iet);
drivers/gpu/drm/i915/display/intel_histogram_regs.h +4 -0
index 213c9f483567..3fbb9c2deaae 100644
@@ -45,6 +45,31 @@
 #define _DPST_BIN_B					0x491C4
 #define DPST_BIN(pipe)
 	_MMIO_PIPE(pipe, _DPST_BIN_A, _DPST_BIN_B)
 #define  DPST_BIN_DATA_MASK
 	REG_GENMASK(23, 0)
+#define  DPST_BIN_DATA(val)
 	REG_FIELD_PREP(DPST_BIN_DATA_MASK, val)
 #define  DPST_BIN_BUSY					REG_BIT(31)
 
+#define _DPST_HIST_INDEX_A				0x490D8
+#define _DPST_HIST_INDEX_B				0x491D8
+#define DPST_HIST_INDEX(pipe)

_MMIO_PIPE(pipe, _DPST_HIST_INDEX_A, _DPST_HIST_INDEX_B)
+#define DPST_HIST_BIN_INDEX_MASK

	REG_GENMASK(4, 0)

+#define DPST_HIST_BIN_INDEX(val)
REG_FIELD_PREP(DPST_HIST_BIN_INDEX_MASK, val)

drivers/gpu/drm/i915/display/intel_histogram_regs.h +4 -0
+
+#define _DPST_HIST_BIN_A				0x490C4
+#define _DPST_HIST_BIN_B				0x491C4
+#define DPST_HIST_BIN(pipe)				_MMIO_PIPE(pipe,

_DPST_HIST_BIN_A, _DPST_HIST_BIN_B)

drivers/gpu/drm/i915/display/intel_histogram_regs.h +2 -0
+#define  DPST_HIST_BIN_BUSY				REG_BIT(31)
+#define  DPST_HIST_BIN_DATA_MASK
	REG_GENMASK(30, 0)
drivers/gpu/drm/i915/display/intel_histogram_regs.h +4 -0
+
+#define _DPST_IE_BIN_A					0x490CC
+#define _DPST_IE_BIN_B					0x491CC
+#define DPST_IE_BIN(pipe)				_MMIO_PIPE(pipe,

_DPST_IE_BIN_A, _DPST_IE_BIN_B)
+#define DPST_IE_BIN_DATA_MASK

	REG_GENMASK(9, 0)

+#define DPST_IE_BIN_DATA(val)
REG_FIELD_PREP(DPST_IE_BIN_DATA_MASK, val)

drivers/gpu/drm/i915/display/intel_histogram_regs.h +4 -0
+
+#define _DPST_IE_INDEX_A				0x490DC
+#define _DPST_IE_INDEX_B				0x491DC
+#define DPST_IE_INDEX(pipe)				_MMIO_PIPE(pipe,

_DPST_IE_INDEX_A, _DPST_IE_INDEX_B)
+#define DPST_IE_BIN_INDEX_MASK

	REG_GENMASK(6, 0)

+#define DPST_IE_BIN_INDEX(val)
REG_FIELD_PREP(DPST_IE_BIN_INDEX_MASK, val)
+
#endif /* __INTEL_HISTOGRAM_REGS_H__ */
--
2.25.1

#17 lore raw

PATCH v9 10/10 drm/i915/histogram: Enable pipe dithering

In reply to Arun R Murthy

Enable pipe dithering while enabling histogram to overcome some atrifacts seen on the screen.

---
 drivers/gpu/drm/i915/display/intel_histogram.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/i915/display/intel_histogram.c +10 -0
index 48495480107e..53d0c42049d8 100644
@@ -29,6 +29,13 @@ struct intel_histogram {
 	u32 bin_data[HISTOGRAM_BIN_COUNT];
 };
 
+static void intel_histogram_enable_dithering(struct intel_display *display,
+					     enum pipe pipe)
+{
+	intel_de_rmw(display, PIPE_MISC(pipe), PIPE_MISC_DITHER_ENABLE,
+		     PIPE_MISC_DITHER_ENABLE);
+}
+
 static void set_bin_index_0(struct intel_display *display, enum pipe pipe)
 {
 	if (DISPLAY_VER(display) >= 20)
@@ -209,6 +216,9 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)
 	if (histogram->enable)
 		return 0;
 
+	/* Pipe Dithering should be enabled with histogram */
+	intel_histogram_enable_dithering(display, pipe);
+
 	 /* enable histogram, clear DPST_BIN reg and select TC function */
 	if (DISPLAY_VER(display) >= 20)
 		intel_de_rmw(display, DPST_CTL(pipe),
Signature · 1 line
2.25.1
#18 lore raw

✓ CI.Patch_applied: success for Display Global Histogram (rev5)

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

Series: Display Global Histogram (rev5)
URL : https://patchwork.freedesktop.org/series/138867/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 4de82d50b8de drm-tip: 2024y-12m-03d-00h-37m-04s UTC integration manifest === git am output follows ===
Applying: drm/crtc: Add histogram properties
Applying: drm/crtc: Expose API to create drm crtc property for histogram
Applying: drm/i915/histogram: Define registers for histogram
Applying: drm/i915/histogram: Add support for histogram
Applying: drm/xe: Add histogram support to Xe builds
Applying: drm/i915/histogram: histogram interrupt handling
Applying: drm/i915/display: handle drm-crtc histogram property updates
Applying: drm/i915/histogram: histogram delay counter doesnt reset
Applying: drm/i915/histogram: Histogram changes for Display 20+
Applying: drm/i915/histogram: Enable pipe dithering

#19 lore raw

✗ CI.checkpatch: warning for Display Global Histogram (rev5)

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

Series: Display Global Histogram (rev5)
URL : https://patchwork.freedesktop.org/series/138867/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 4af2ce7a9080671bcbf3858e32766d05d0e46571

Author: Arun R Murthy <[email protected]>
Date:   Tue Dec 3 11:25:20 2024 +0530

drm/i915/histogram: Enable pipe dithering

Enable pipe dithering while enabling histogram to overcome some atrifacts seen on the screen.

+ /mt/dim checkpatch 4de82d50b8de6a278c1483a7f76ae830c89d1824 drm-intel b18dd775084f drm/crtc: Add histogram properties
bfaad4d0ddb2 drm/crtc: Expose API to create drm crtc property for histogram 41219d88dcaa drm/i915/histogram: Define registers for histogram
-:15: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #15:
new file mode 100644

-:20: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/intel_histogram_regs.h', please use '/*' instead #20: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:1:
+// SPDX-License-Identifier: MIT

-:20: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #20: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:1:
+// SPDX-License-Identifier: MIT

-:39: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #39: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:20:
+#define DPST_CTL_EN_MULTIPLICATIVE REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)

-:46: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #46: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:27:
+#define DPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)

-:47: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #47: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:28:
+#define DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)

-:53: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #53: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:34:
+#define DPST_GUARD(pipe) _MMIO_PIPE(pipe, _DPST_GUARD_A, _DPST_GUARD_B)

-:57: WARNING:LONG_LINE: line length of 116 exceeds 100 columns #57: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:38:
+#define DPST_GUARD_INTERRUPT_DELAY(val) REG_FIELD_PREP(DPST_GUARD_INTERRUPT_DELAY_MASK, val)

-:59: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #59: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:40:
+#define DPST_GUARD_THRESHOLD_GB(val) REG_FIELD_PREP(DPST_GUARD_THRESHOLD_GB_MASK, val)

total: 0 errors, 9 warnings, 0 checks, 48 lines checked
bbc78955d480 drm/i915/histogram: Add support for histogram
-:49: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #49:
new file mode 100644

-:214: WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply #214: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:161:
+ data = kzalloc(sizeof(data) * hist->nr_elements, GFP_KERNEL);

-:246: WARNING:BRACES: braces {} are not necessary for single statement blocks #246: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:193:
+ if (!histogram) {
+ return -ENOMEM;
+ }

-:262: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/intel_histogram.h', please use '/*' instead #262: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:1:
+// SPDX-License-Identifier: MIT

-:262: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #262: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:1:
+// SPDX-License-Identifier: MIT

total: 0 errors, 5 warnings, 0 checks, 254 lines checked e6b4a537ba59 drm/xe: Add histogram support to Xe builds 17e162fbbe31 drm/i915/histogram: histogram interrupt handling
-:6: WARNING:TYPO_SPELLING: 'trigerred' may be misspelled - perhaps 'triggered'? #6:
Upon enabling histogram an interrupt is trigerred after the generation

                                        ^^^^^^^^^

-:76: WARNING:BRACES: braces {} are not necessary for any arm of this statement #76: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:41:
+ if (!(dpstbin & DPST_BIN_BUSY)) {
[...]
+ } else
[...]

-:78: CHECK:BRACES: Unbalanced braces around else statement #78: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:43:
+ } else

-:91: WARNING:STATIC_CONST_CHAR_ARRAY: char * array declaration might be better as static const #91: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:56:
+ char *histogram_event[] = { event, pipe_id, NULL };

total: 0 errors, 3 warnings, 1 checks, 184 lines checked 1541d9faa6ac drm/i915/display: handle drm-crtc histogram property updates -:90: ERROR:ASSIGN_IN_IF: do not use assignment in if condition #90: FILE: drivers/gpu/drm/i915/display/intel_display.c:6842:
+ if (new_crtc_state->uapi.histogram_enable |=

-:139: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*hist)...) over kzalloc(sizeof(struct drm_histogram)...) #139: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:80:
+ hist = kzalloc(sizeof(struct drm_histogram), GFP_KERNEL);

-:146: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #146: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:87:
+ drm_property_replace_global_blob(display->drm,
+ &intel_crtc->base.state->histogram_data,

total: 1 errors, 0 warnings, 2 checks, 111 lines checked 64f742e7ab1e drm/i915/histogram: histogram delay counter doesnt reset -:4: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'? #4:
Subject: [PATCH] drm/i915/histogram: histogram delay counter doesnt reset

                                                             ^^^^^^

-:42: WARNING:LONG_LINE_COMMENT: line length of 103 exceeds 100 columns #42: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:111:
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */

-:61: WARNING:LONG_LINE: line length of 115 exceeds 100 columns #61: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:20:
+#define DPST_CTL_GUARDBAND_INTERRUPT_DELAY(val) REG_FIELD_PREP(DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT, val)

total: 0 errors, 3 warnings, 0 checks, 34 lines checked cbc8910acf17 drm/i915/histogram: Histogram changes for Display 20+ -:38: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #38: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:44:
+static void write_iet(struct intel_display *display, enum pipe pipe,
+ u32 *data)

-:194: WARNING:LONG_LINE: line length of 112 exceeds 100 columns #194: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:53:
+#define DPST_HIST_INDEX(pipe) _MMIO_PIPE(pipe, _DPST_HIST_INDEX_A, _DPST_HIST_INDEX_B)

-:196: WARNING:LONG_LINE: line length of 101 exceeds 100 columns #196: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:55:
+#define DPST_HIST_BIN_INDEX(val) REG_FIELD_PREP(DPST_HIST_BIN_INDEX_MASK, val)

-:200: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #200: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:59:
+#define DPST_HIST_BIN(pipe) _MMIO_PIPE(pipe, _DPST_HIST_BIN_A, _DPST_HIST_BIN_B)

-:206: WARNING:LONG_LINE: line length of 104 exceeds 100 columns #206: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:65:
+#define DPST_IE_BIN(pipe) _MMIO_PIPE(pipe, _DPST_IE_BIN_A, _DPST_IE_BIN_B)

-:212: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #212: FILE: drivers/gpu/drm/i915/display/intel_histogram_regs.h:71:
+#define DPST_IE_INDEX(pipe) _MMIO_PIPE(pipe, _DPST_IE_INDEX_A, _DPST_IE_INDEX_B)

total: 0 errors, 5 warnings, 1 checks, 183 lines checked 4af2ce7a9080 drm/i915/histogram: Enable pipe dithering

#20 lore raw

✓ CI.KUnit: success for Display Global Histogram (rev5)

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

Series: Display Global Histogram (rev5)
URL : https://patchwork.freedesktop.org/series/138867/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [06:12:16] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[06:12:21] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[06:12:49] Starting KUnit Kernel (1/1)...
[06:12:49] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:12:50] =================== guc_dbm (7 subtests) ===================
[06:12:50] [PASSED] test_empty
[06:12:50] [PASSED] test_default
[06:12:50] ======================== test_size  ========================
[06:12:50] [PASSED] 4
[06:12:50] [PASSED] 8
[06:12:50] [PASSED] 32
[06:12:50] [PASSED] 256
[06:12:50] ==================== [PASSED] test_size ====================
[06:12:50] ======================= test_reuse  ========================
[06:12:50] [PASSED] 4
[06:12:50] [PASSED] 8
[06:12:50] [PASSED] 32
[06:12:50] [PASSED] 256
[06:12:50] =================== [PASSED] test_reuse ====================
[06:12:50] =================== test_range_overlap  ====================
[06:12:50] [PASSED] 4
[06:12:50] [PASSED] 8
[06:12:50] [PASSED] 32
[06:12:50] [PASSED] 256
[06:12:50] =============== [PASSED] test_range_overlap ================
[06:12:50] =================== test_range_compact  ====================
[06:12:50] [PASSED] 4
[06:12:50] [PASSED] 8
[06:12:50] [PASSED] 32
[06:12:50] [PASSED] 256
[06:12:50] =============== [PASSED] test_range_compact ================
[06:12:50] ==================== test_range_spare  =====================
[06:12:50] [PASSED] 4
[06:12:50] [PASSED] 8
[06:12:50] [PASSED] 32
[06:12:50] [PASSED] 256
[06:12:50] ================ [PASSED] test_range_spare =================
[06:12:50] ===================== [PASSED] guc_dbm =====================
[06:12:50] =================== guc_idm (6 subtests) ===================
[06:12:50] [PASSED] bad_init
[06:12:50] [PASSED] no_init
[06:12:50] [PASSED] init_fini
[06:12:50] [PASSED] check_used
[06:12:50] [PASSED] check_quota
[06:12:50] [PASSED] check_all
[06:12:50] ===================== [PASSED] guc_idm =====================
[06:12:50] ================== no_relay (3 subtests) ===================
[06:12:50] [PASSED] xe_drops_guc2pf_if_not_ready
[06:12:50] [PASSED] xe_drops_guc2vf_if_not_ready
[06:12:50] [PASSED] xe_rejects_send_if_not_ready
[06:12:50] ==================== [PASSED] no_relay =====================
[06:12:50] ================== pf_relay (14 subtests) ==================
[06:12:50] [PASSED] pf_rejects_guc2pf_too_short
[06:12:50] [PASSED] pf_rejects_guc2pf_too_long
[06:12:50] [PASSED] pf_rejects_guc2pf_no_payload
[06:12:50] [PASSED] pf_fails_no_payload
[06:12:50] [PASSED] pf_fails_bad_origin
[06:12:50] [PASSED] pf_fails_bad_type
[06:12:50] [PASSED] pf_txn_reports_error
[06:12:50] [PASSED] pf_txn_sends_pf2guc
[06:12:50] [PASSED] pf_sends_pf2guc
[06:12:50] [SKIPPED] pf_loopback_nop
[06:12:50] [SKIPPED] pf_loopback_echo
[06:12:50] [SKIPPED] pf_loopback_fail
[06:12:50] [SKIPPED] pf_loopback_busy
[06:12:50] [SKIPPED] pf_loopback_retry
[06:12:50] ==================== [PASSED] pf_relay =====================
[06:12:50] ================== vf_relay (3 subtests) ===================
[06:12:50] [PASSED] vf_rejects_guc2vf_too_short
[06:12:50] [PASSED] vf_rejects_guc2vf_too_long
[06:12:50] [PASSED] vf_rejects_guc2vf_no_payload
[06:12:50] ==================== [PASSED] vf_relay =====================
[06:12:50] ================= pf_service (11 subtests) =================
[06:12:50] [PASSED] pf_negotiate_any
[06:12:50] [PASSED] pf_negotiate_base_match
[06:12:50] [PASSED] pf_negotiate_base_newer
[06:12:50] [PASSED] pf_negotiate_base_next
[06:12:50] [SKIPPED] pf_negotiate_base_older
[06:12:50] [PASSED] pf_negotiate_base_prev
[06:12:50] [PASSED] pf_negotiate_latest_match
[06:12:50] [PASSED] pf_negotiate_latest_newer
[06:12:50] [PASSED] pf_negotiate_latest_next
[06:12:50] [SKIPPED] pf_negotiate_latest_older
[06:12:50] [SKIPPED] pf_negotiate_latest_prev
[06:12:50] =================== [PASSED] pf_service ====================
[06:12:50] ===================== lmtt (1 subtest) =====================
[06:12:50] ======================== test_ops  =========================
[06:12:50] [PASSED] 2-level
[06:12:50] [PASSED] multi-level
[06:12:50] ==================== [PASSED] test_ops =====================
[06:12:50] ====================== [PASSED] lmtt =======================
[06:12:50] =================== xe_mocs (2 subtests) ===================
[06:12:50] ================ xe_live_mocs_kernel_kunit  ================
[06:12:50] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[06:12:50] ================ xe_live_mocs_reset_kunit  =================
[06:12:50] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[06:12:50] ==================== [SKIPPED] xe_mocs =====================
[06:12:50] ================= xe_migrate (2 subtests) ==================
[06:12:50] ================= xe_migrate_sanity_kunit  =================
[06:12:50] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[06:12:50] ================== xe_validate_ccs_kunit  ==================
[06:12:50] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[06:12:50] =================== [SKIPPED] xe_migrate ===================
[06:12:50] ================== xe_dma_buf (1 subtest) ==================
[06:12:50] ==================== xe_dma_buf_kunit  =====================
[06:12:50] ================ [SKIPPED] xe_dma_buf_kunit ================
[06:12:50] =================== [SKIPPED] xe_dma_buf ===================
[06:12:50] ==================== xe_bo (3 subtests) ====================
[06:12:50] ================== xe_ccs_migrate_kunit  ===================
[06:12:50] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[06:12:50] ==================== xe_bo_evict_kunit  ====================
[06:12:50] =============== [SKIPPED] xe_bo_evict_kunit ================
[06:12:50] =================== xe_bo_shrink_kunit  ====================
[06:12:50] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[06:12:50] ===================== [SKIPPED] xe_bo ======================
[06:12:50] ==================== args (11 subtests) ====================
[06:12:50] [PASSED] count_args_test
[06:12:50] [PASSED] call_args_example
[06:12:50] [PASSED] call_args_test
[06:12:50] [PASSED] drop_first_arg_example
[06:12:50] [PASSED] drop_first_arg_test
[06:12:50] [PASSED] first_arg_example
[06:12:50] [PASSED] first_arg_test
[06:12:50] [PASSED] last_arg_example
[06:12:50] [PASSED] last_arg_test
[06:12:50] [PASSED] pick_arg_example
[06:12:50] [PASSED] sep_comma_examplestty: 'standard input': Inappropriate ioctl for device

[06:12:50] ====================== [PASSED] args ======================= [06:12:50] =================== xe_pci (2 subtests) ==================== [06:12:50] [PASSED] xe_gmdid_graphics_ip
[06:12:50] [PASSED] xe_gmdid_media_ip
[06:12:50] ===================== [PASSED] xe_pci ====================== [06:12:50] =================== xe_rtp (2 subtests) ==================== [06:12:50] =============== xe_rtp_process_to_sr_tests ================ [06:12:50] [PASSED] coalesce-same-reg
[06:12:50] [PASSED] no-match-no-add
[06:12:50] [PASSED] match-or
[06:12:50] [PASSED] match-or-xfail
[06:12:50] [PASSED] no-match-no-add-multiple-rules
[06:12:50] [PASSED] two-regs-two-entries
[06:12:50] [PASSED] clr-one-set-other
[06:12:50] [PASSED] set-field
[06:12:50] [PASSED] conflict-duplicate
[06:12:50] [PASSED] conflict-not-disjoint
[06:12:50] [PASSED] conflict-reg-type
[06:12:50] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [06:12:50] ================== xe_rtp_process_tests =================== [06:12:50] [PASSED] active1
[06:12:50] [PASSED] active2
[06:12:50] [PASSED] active-inactive
[06:12:50] [PASSED] inactive-active
[06:12:50] [PASSED] inactive-1st_or_active-inactive
[06:12:50] [PASSED] inactive-2nd_or_active-inactive
[06:12:50] [PASSED] inactive-last_or_active-inactive
[06:12:50] [PASSED] inactive-no_or_active-inactive
[06:12:50] ============== [PASSED] xe_rtp_process_tests =============== [06:12:50] ===================== [PASSED] xe_rtp ====================== [06:12:50] ==================== xe_wa (1 subtest) ===================== [06:12:50] ======================== xe_wa_gt ========================= [06:12:50] [PASSED] TIGERLAKE (B0)
[06:12:50] [PASSED] DG1 (A0)
[06:12:50] [PASSED] DG1 (B0)
[06:12:50] [PASSED] ALDERLAKE_S (A0)
[06:12:50] [PASSED] ALDERLAKE_S (B0)
[06:12:50] [PASSED] ALDERLAKE_S (C0)
[06:12:50] [PASSED] ALDERLAKE_S (D0)
[06:12:50] [PASSED] ALDERLAKE_P (A0)
[06:12:50] [PASSED] ALDERLAKE_P (B0)
[06:12:50] [PASSED] ALDERLAKE_P (C0)
[06:12:50] [PASSED] ALDERLAKE_S_RPLS (D0)
[06:12:50] [PASSED] ALDERLAKE_P_RPLU (E0)
[06:12:50] [PASSED] DG2_G10 (C0)
[06:12:50] [PASSED] DG2_G11 (B1)
[06:12:50] [PASSED] DG2_G12 (A1)
[06:12:50] [PASSED] METEORLAKE (g:A0, m:A0)
[06:12:50] [PASSED] METEORLAKE (g:A0, m:A0)
[06:12:50] [PASSED] METEORLAKE (g:A0, m:A0)
[06:12:50] [PASSED] LUNARLAKE (g:A0, m:A0)
[06:12:50] [PASSED] LUNARLAKE (g:B0, m:A0)
[06:12:50] [PASSED] BATTLEMAGE (g:A0, m:A1)
[06:12:50] ==================== [PASSED] xe_wa_gt ===================== [06:12:50] ====================== [PASSED] xe_wa ====================== [06:12:50] ============================================================ [06:12:50] Testing complete. Ran 122 tests: passed: 106, skipped: 16 [06:12:50] Elapsed time: 33.385s total, 4.415s configuring, 28.703s building, 0.225s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [06:12:50] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[06:12:51] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[06:13:14] Starting KUnit Kernel (1/1)...
[06:13:14] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:13:14] ================== drm_buddy (7 subtests) ==================
[06:13:14] [PASSED] drm_test_buddy_alloc_limit
[06:13:14] [PASSED] drm_test_buddy_alloc_optimistic
[06:13:14] [PASSED] drm_test_buddy_alloc_pessimistic
[06:13:14] [PASSED] drm_test_buddy_alloc_pathological
[06:13:14] [PASSED] drm_test_buddy_alloc_contiguous
[06:13:14] [PASSED] drm_test_buddy_alloc_clear
[06:13:14] [PASSED] drm_test_buddy_alloc_range_bias
[06:13:14] ==================== [PASSED] drm_buddy ====================
[06:13:14] ============= drm_cmdline_parser (40 subtests) =============
[06:13:14] [PASSED] drm_test_cmdline_force_d_only
[06:13:14] [PASSED] drm_test_cmdline_force_D_only_dvi
[06:13:14] [PASSED] drm_test_cmdline_force_D_only_hdmi
[06:13:14] [PASSED] drm_test_cmdline_force_D_only_not_digital
[06:13:14] [PASSED] drm_test_cmdline_force_e_only
[06:13:14] [PASSED] drm_test_cmdline_res
[06:13:14] [PASSED] drm_test_cmdline_res_vesa
[06:13:14] [PASSED] drm_test_cmdline_res_vesa_rblank
[06:13:14] [PASSED] drm_test_cmdline_res_rblank
[06:13:14] [PASSED] drm_test_cmdline_res_bpp
[06:13:14] [PASSED] drm_test_cmdline_res_refresh
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[06:13:14] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[06:13:14] [PASSED] drm_test_cmdline_res_margins_force_on
[06:13:14] [PASSED] drm_test_cmdline_res_vesa_margins
[06:13:14] [PASSED] drm_test_cmdline_name
[06:13:14] [PASSED] drm_test_cmdline_name_bpp
[06:13:14] [PASSED] drm_test_cmdline_name_option
[06:13:14] [PASSED] drm_test_cmdline_name_bpp_option
[06:13:14] [PASSED] drm_test_cmdline_rotate_0
[06:13:14] [PASSED] drm_test_cmdline_rotate_90
[06:13:14] [PASSED] drm_test_cmdline_rotate_180
[06:13:14] [PASSED] drm_test_cmdline_rotate_270
[06:13:14] [PASSED] drm_test_cmdline_hmirror
[06:13:14] [PASSED] drm_test_cmdline_vmirror
[06:13:14] [PASSED] drm_test_cmdline_margin_options
[06:13:14] [PASSED] drm_test_cmdline_multiple_options
[06:13:14] [PASSED] drm_test_cmdline_bpp_extra_and_option
[06:13:14] [PASSED] drm_test_cmdline_extra_and_option
[06:13:14] [PASSED] drm_test_cmdline_freestanding_options
[06:13:14] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[06:13:14] [PASSED] drm_test_cmdline_panel_orientation
[06:13:14] ================ drm_test_cmdline_invalid  =================
[06:13:14] [PASSED] margin_only
[06:13:14] [PASSED] interlace_only
[06:13:14] [PASSED] res_missing_x
[06:13:14] [PASSED] res_missing_y
[06:13:14] [PASSED] res_bad_y
[06:13:14] [PASSED] res_missing_y_bpp
[06:13:14] [PASSED] res_bad_bpp
[06:13:14] [PASSED] res_bad_refresh
[06:13:14] [PASSED] res_bpp_refresh_force_on_off
[06:13:14] [PASSED] res_invalid_mode
[06:13:14] [PASSED] res_bpp_wrong_place_mode
[06:13:14] [PASSED] name_bpp_refresh
[06:13:14] [PASSED] name_refresh
[06:13:14] [PASSED] name_refresh_wrong_mode
[06:13:14] [PASSED] name_refresh_invalid_mode
[06:13:14] [PASSED] rotate_multiple
[06:13:14] [PASSED] rotate_invalid_val
[06:13:14] [PASSED] rotate_truncated
[06:13:14] [PASSED] invalid_option
[06:13:14] [PASSED] invalid_tv_option
[06:13:14] [PASSED] truncated_tv_option
[06:13:14] ============ [PASSED] drm_test_cmdline_invalid =============
[06:13:14] =============== drm_test_cmdline_tv_options  ===============
[06:13:14] [PASSED] NTSC
[06:13:14] [PASSED] NTSC_443
[06:13:14] [PASSED] NTSC_J
[06:13:14] [PASSED] PAL
[06:13:14] [PASSED] PAL_M
[06:13:14] [PASSED] PAL_N
[06:13:14] [PASSED] SECAM
[06:13:14] [PASSED] MONO_525
[06:13:14] [PASSED] MONO_625
[06:13:14] =========== [PASSED] drm_test_cmdline_tv_options ===========
[06:13:14] =============== [PASSED] drm_cmdline_parser ================
[06:13:14] ========== drmm_connector_hdmi_init (19 subtests) ==========
[06:13:14] [PASSED] drm_test_connector_hdmi_init_valid
[06:13:14] [PASSED] drm_test_connector_hdmi_init_bpc_8
[06:13:14] [PASSED] drm_test_connector_hdmi_init_bpc_10
[06:13:14] [PASSED] drm_test_connector_hdmi_init_bpc_12
[06:13:14] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[06:13:14] [PASSED] drm_test_connector_hdmi_init_bpc_null
[06:13:14] [PASSED] drm_test_connector_hdmi_init_formats_empty
[06:13:14] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[06:13:14] [PASSED] drm_test_connector_hdmi_init_null_ddc
[06:13:14] [PASSED] drm_test_connector_hdmi_init_null_product
[06:13:14] [PASSED] drm_test_connector_hdmi_init_null_vendor
[06:13:14] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[06:13:14] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[06:13:14] [PASSED] drm_test_connector_hdmi_init_product_valid
[06:13:14] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[06:13:14] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[06:13:14] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[06:13:14] ========= drm_test_connector_hdmi_init_type_valid  =========
[06:13:14] [PASSED] HDMI-A
[06:13:14] [PASSED] HDMI-B
[06:13:14] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[06:13:14] ======== drm_test_connector_hdmi_init_type_invalid  ========
[06:13:14] [PASSED] Unknown
[06:13:14] [PASSED] VGA
[06:13:14] [PASSED] DVI-I
[06:13:14] [PASSED] DVI-D
[06:13:14] [PASSED] DVI-A
[06:13:14] [PASSED] Composite
[06:13:14] [PASSED] SVIDEO
[06:13:14] [PASSED] LVDS
[06:13:14] [PASSED] Component
[06:13:14] [PASSED] DIN
[06:13:14] [PASSED] DP
[06:13:14] [PASSED] TV
[06:13:14] [PASSED] eDP
[06:13:14] [PASSED] Virtual
[06:13:14] [PASSED] DSI
[06:13:14] [PASSED] DPI
[06:13:14] [PASSED] Writeback
[06:13:14] [PASSED] SPI
[06:13:14] [PASSED] USB
[06:13:14] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[06:13:14] ============ [PASSED] drmm_connector_hdmi_init =============
[06:13:14] ============= drmm_connector_init (3 subtests) =============
[06:13:14] [PASSED] drm_test_drmm_connector_init
[06:13:14] [PASSED] drm_test_drmm_connector_init_null_ddc
[06:13:14] ========= drm_test_drmm_connector_init_type_valid  =========
[06:13:14] [PASSED] Unknown
[06:13:14] [PASSED] VGA
[06:13:14] [PASSED] DVI-I
[06:13:14] [PASSED] DVI-D
[06:13:14] [PASSED] DVI-A
[06:13:14] [PASSED] Composite
[06:13:14] [PASSED] SVIDEO
[06:13:14] [PASSED] LVDS
[06:13:14] [PASSED] Component
[06:13:14] [PASSED] DIN
[06:13:14] [PASSED] DP
[06:13:14] [PASSED] HDMI-A
[06:13:14] [PASSED] HDMI-B
[06:13:14] [PASSED] TV
[06:13:14] [PASSED] eDP
[06:13:14] [PASSED] Virtual
[06:13:14] [PASSED] DSI
[06:13:14] [PASSED] DPI
[06:13:14] [PASSED] Writeback
[06:13:14] [PASSED] SPI
[06:13:14] [PASSED] USB
[06:13:14] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[06:13:14] =============== [PASSED] drmm_connector_init ===============
[06:13:14] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[06:13:14] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[06:13:14] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[06:13:14] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[06:13:14] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[06:13:14] ========== drm_test_get_tv_mode_from_name_valid  ===========
[06:13:14] [PASSED] NTSC
[06:13:14] [PASSED] NTSC-443
[06:13:14] [PASSED] NTSC-J
[06:13:14] [PASSED] PAL
[06:13:14] [PASSED] PAL-M
[06:13:14] [PASSED] PAL-N
[06:13:14] [PASSED] SECAM
[06:13:14] [PASSED] Mono
[06:13:14] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[06:13:14] [PASSED] drm_test_get_tv_mode_from_name_truncated
[06:13:14] ============ [PASSED] drm_get_tv_mode_from_name ============
[06:13:14] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[06:13:14] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[06:13:14] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[06:13:14] [PASSED] VIC 96
[06:13:14] [PASSED] VIC 97
[06:13:14] [PASSED] VIC 101
[06:13:14] [PASSED] VIC 102
[06:13:14] [PASSED] VIC 106
[06:13:14] [PASSED] VIC 107
[06:13:14] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[06:13:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[06:13:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[06:13:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[06:13:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[06:13:14] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[06:13:14] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[06:13:14] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[06:13:14] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[06:13:14] [PASSED] Automatic
[06:13:14] [PASSED] Full
[06:13:14] [PASSED] Limited 16:235
[06:13:14] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[06:13:14] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[06:13:14] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[06:13:14] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[06:13:14] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[06:13:14] [PASSED] RGB
[06:13:14] [PASSED] YUV 4:2:0
[06:13:14] [PASSED] YUV 4:2:2
[06:13:14] [PASSED] YUV 4:4:4
[06:13:14] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[06:13:14] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[06:13:14] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[06:13:14] ============= drm_damage_helper (21 subtests) ==============
[06:13:14] [PASSED] drm_test_damage_iter_no_damage
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_src_moved
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_not_visible
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[06:13:14] [PASSED] drm_test_damage_iter_no_damage_no_fb
[06:13:14] [PASSED] drm_test_damage_iter_simple_damage
[06:13:14] [PASSED] drm_test_damage_iter_single_damage
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_outside_src
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_src_moved
[06:13:14] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[06:13:14] [PASSED] drm_test_damage_iter_damage
[06:13:14] [PASSED] drm_test_damage_iter_damage_one_intersect
[06:13:14] [PASSED] drm_test_damage_iter_damage_one_outside
[06:13:14] [PASSED] drm_test_damage_iter_damage_src_moved
[06:13:14] [PASSED] drm_test_damage_iter_damage_not_visible
[06:13:14] ================ [PASSED] drm_damage_helper ================
[06:13:14] ============== drm_dp_mst_helper (3 subtests) ==============
[06:13:14] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[06:13:14] [PASSED] Clock 154000 BPP 30 DSC disabled
[06:13:14] [PASSED] Clock 234000 BPP 30 DSC disabled
[06:13:14] [PASSED] Clock 297000 BPP 24 DSC disabled
[06:13:14] [PASSED] Clock 332880 BPP 24 DSC enabled
[06:13:14] [PASSED] Clock 324540 BPP 24 DSC enabled
[06:13:14] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[06:13:14] ============== drm_test_dp_mst_calc_pbn_div  ===============
[06:13:14] [PASSED] Link rate 2000000 lane count 4
[06:13:14] [PASSED] Link rate 2000000 lane count 2
[06:13:14] [PASSED] Link rate 2000000 lane count 1
[06:13:14] [PASSED] Link rate 1350000 lane count 4
[06:13:14] [PASSED] Link rate 1350000 lane count 2
[06:13:14] [PASSED] Link rate 1350000 lane count 1
[06:13:14] [PASSED] Link rate 1000000 lane count 4
[06:13:14] [PASSED] Link rate 1000000 lane count 2
[06:13:14] [PASSED] Link rate 1000000 lane count 1
[06:13:14] [PASSED] Link rate 810000 lane count 4
[06:13:14] [PASSED] Link rate 810000 lane count 2
[06:13:14] [PASSED] Link rate 810000 lane count 1
[06:13:14] [PASSED] Link rate 540000 lane count 4
[06:13:14] [PASSED] Link rate 540000 lane count 2
[06:13:14] [PASSED] Link rate 540000 lane count 1
[06:13:14] [PASSED] Link rate 270000 lane count 4
[06:13:14] [PASSED] Link rate 270000 lane count 2
[06:13:14] [PASSED] Link rate 270000 lane count 1
[06:13:14] [PASSED] Link rate 162000 lane count 4
[06:13:14] [PASSED] Link rate 162000 lane count 2
[06:13:14] [PASSED] Link rate 162000 lane count 1
[06:13:14] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[06:13:14] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[06:13:14] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[06:13:14] [PASSED] DP_POWER_UP_PHY with port number
[06:13:14] [PASSED] DP_POWER_DOWN_PHY with port number
[06:13:14] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[06:13:14] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[06:13:14] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[06:13:14] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[06:13:14] [PASSED] DP_QUERY_PAYLOAD with port number
[06:13:14] [PASSED] DP_QUERY_PAYLOAD with VCPI
[06:13:14] [PASSED] DP_REMOTE_DPCD_READ with port number
[06:13:14] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[06:13:14] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[06:13:14] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[06:13:14] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[06:13:14] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[06:13:14] [PASSED] DP_REMOTE_I2C_READ with port number
[06:13:14] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[06:13:14] [PASSED] DP_REMOTE_I2C_READ with transactions array
[06:13:14] [PASSED] DP_REMOTE_I2C_WRITE with port number
[06:13:14] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[06:13:14] [PASSED] DP_REMOTE_I2C_WRITE with data array
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[06:13:14] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[06:13:14] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[06:13:14] ================ [PASSED] drm_dp_mst_helper ================
[06:13:14] ================== drm_exec (7 subtests) ===================
[06:13:14] [PASSED] sanitycheck
[06:13:14] [PASSED] test_lock
[06:13:14] [PASSED] test_lock_unlock
[06:13:14] [PASSED] test_duplicates
[06:13:14] [PASSED] test_prepare
[06:13:14] [PASSED] test_prepare_array
[06:13:14] [PASSED] test_multiple_loops
[06:13:14] ==================== [PASSED] drm_exec =====================
[06:13:14] =========== drm_format_helper_test (17 subtests) ===========
[06:13:14] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[06:13:14] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[06:13:14] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[06:13:14] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[06:13:14] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[06:13:14] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[06:13:14] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[06:13:14] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[06:13:14] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[06:13:14] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[06:13:14] ============== drm_test_fb_xrgb8888_to_mono  ===============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[06:13:14] ==================== drm_test_fb_swab  =====================
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ================ [PASSED] drm_test_fb_swab =================
[06:13:14] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[06:13:14] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[06:13:14] [PASSED] single_pixel_source_buffer
[06:13:14] [PASSED] single_pixel_clip_rectangle
[06:13:14] [PASSED] well_known_colors
[06:13:14] [PASSED] destination_pitch
[06:13:14] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[06:13:14] ================= drm_test_fb_clip_offset  =================
[06:13:14] [PASSED] pass through
[06:13:14] [PASSED] horizontal offset
[06:13:14] [PASSED] vertical offset
[06:13:14] [PASSED] horizontal and vertical offset
[06:13:14] [PASSED] horizontal offset (custom pitch)
[06:13:14] [PASSED] vertical offset (custom pitch)
[06:13:14] [PASSED] horizontal and vertical offset (custom pitch)
[06:13:14] ============= [PASSED] drm_test_fb_clip_offset =============
[06:13:14] ============== drm_test_fb_build_fourcc_list  ==============
[06:13:14] [PASSED] no native formats
[06:13:14] [PASSED] XRGB8888 as native format
[06:13:14] [PASSED] remove duplicates
[06:13:14] [PASSED] convert alpha formats
[06:13:14] [PASSED] random formats
[06:13:14] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[06:13:14] =================== drm_test_fb_memcpy  ====================
[06:13:14] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[06:13:14] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[06:13:14] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[06:13:14] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[06:13:14] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[06:13:14] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[06:13:14] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[06:13:14] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[06:13:14] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[06:13:14] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[06:13:14] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[06:13:14] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[06:13:14] =============== [PASSED] drm_test_fb_memcpy ================
[06:13:14] ============= [PASSED] drm_format_helper_test ==============
[06:13:14] ================= drm_format (18 subtests) =================
[06:13:14] [PASSED] drm_test_format_block_width_invalid
[06:13:14] [PASSED] drm_test_format_block_width_one_plane
[06:13:14] [PASSED] drm_test_format_block_width_two_plane
[06:13:14] [PASSED] drm_test_format_block_width_three_plane
[06:13:14] [PASSED] drm_test_format_block_width_tiled
[06:13:14] [PASSED] drm_test_format_block_height_invalid
[06:13:14] [PASSED] drm_test_format_block_height_one_plane
[06:13:14] [PASSED] drm_test_format_block_height_two_plane
[06:13:14] [PASSED] drm_test_format_block_height_three_plane
[06:13:14] [PASSED] drm_test_format_block_height_tiled
[06:13:14] [PASSED] drm_test_format_min_pitch_invalid
[06:13:14] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[06:13:14] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[06:13:14] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[06:13:14] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[06:13:14] [PASSED] drm_test_format_min_pitch_two_plane
[06:13:14] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[06:13:14] [PASSED] drm_test_format_min_pitch_tiled
[06:13:14] =================== [PASSED] drm_format ====================
[06:13:14] ============== drm_framebuffer (10 subtests) ===============
[06:13:14] ========== drm_test_framebuffer_check_src_coords  ==========
[06:13:14] [PASSED] Success: source fits into fb
[06:13:14] [PASSED] Fail: overflowing fb with x-axis coordinate
[06:13:14] [PASSED] Fail: overflowing fb with y-axis coordinate
[06:13:14] [PASSED] Fail: overflowing fb with source width
[06:13:14] [PASSED] Fail: overflowing fb with source height
[06:13:14] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[06:13:14] [PASSED] drm_test_framebuffer_cleanup
[06:13:14] =============== drm_test_framebuffer_create  ===============
[06:13:14] [PASSED] ABGR8888 normal sizes
[06:13:14] [PASSED] ABGR8888 max sizes
[06:13:14] [PASSED] ABGR8888 pitch greater than min required
[06:13:14] [PASSED] ABGR8888 pitch less than min required
[06:13:14] [PASSED] ABGR8888 Invalid width
[06:13:14] [PASSED] ABGR8888 Invalid buffer handle
[06:13:14] [PASSED] No pixel format
[06:13:14] [PASSED] ABGR8888 Width 0
[06:13:14] [PASSED] ABGR8888 Height 0
[06:13:14] [PASSED] ABGR8888 Out of bound height * pitch combination
[06:13:14] [PASSED] ABGR8888 Large buffer offset
[06:13:14] [PASSED] ABGR8888 Buffer offset for inexistent plane
[06:13:14] [PASSED] ABGR8888 Invalid flag
[06:13:14] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[06:13:14] [PASSED] ABGR8888 Valid buffer modifier
[06:13:14] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[06:13:14] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] NV12 Normal sizes
[06:13:14] [PASSED] NV12 Max sizes
[06:13:14] [PASSED] NV12 Invalid pitch
[06:13:14] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[06:13:14] [PASSED] NV12 different  modifier per-plane
[06:13:14] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[06:13:14] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] NV12 Modifier for inexistent plane
[06:13:14] [PASSED] NV12 Handle for inexistent plane
[06:13:14] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[06:13:14] [PASSED] YVU420 Normal sizes
[06:13:14] [PASSED] YVU420 Max sizes
[06:13:14] [PASSED] YVU420 Invalid pitch
[06:13:14] [PASSED] YVU420 Different pitches
[06:13:14] [PASSED] YVU420 Different buffer offsets/pitches
[06:13:14] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[06:13:14] [PASSED] YVU420 Valid modifier
[06:13:14] [PASSED] YVU420 Different modifiers per plane
[06:13:14] [PASSED] YVU420 Modifier for inexistent plane
[06:13:14] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[06:13:14] [PASSED] X0L2 Normal sizes
[06:13:14] [PASSED] X0L2 Max sizes
[06:13:14] [PASSED] X0L2 Invalid pitch
[06:13:14] [PASSED] X0L2 Pitch greater than minimum required
[06:13:14] [PASSED] X0L2 Handle for inexistent plane
[06:13:14] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[06:13:14] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[06:13:14] [PASSED] X0L2 Valid modifier
[06:13:14] [PASSED] X0L2 Modifier for inexistent plane
[06:13:14] =========== [PASSED] drm_test_framebuffer_create ===========
[06:13:14] [PASSED] drm_test_framebuffer_free
[06:13:14] [PASSED] drm_test_framebuffer_init
[06:13:14] [PASSED] drm_test_framebuffer_init_bad_format
[06:13:14] [PASSED] drm_test_framebuffer_init_dev_mismatch
[06:13:14] [PASSED] drm_test_framebuffer_lookup
[06:13:14] [PASSED] drm_test_framebuffer_lookup_inexistent
[06:13:14] [PASSED] drm_test_framebuffer_modifiers_not_supported
[06:13:14] ================= [PASSED] drm_framebuffer =================
[06:13:14] ================ drm_gem_shmem (8 subtests) ================
[06:13:14] [PASSED] drm_gem_shmem_test_obj_create
[06:13:14] [PASSED] drm_gem_shmem_test_obj_create_private
[06:13:14] [PASSED] drm_gem_shmem_test_pin_pages
[06:13:14] [PASSED] drm_gem_shmem_test_vmap
[06:13:14] [PASSED] drm_gem_shmem_test_get_pages_sgt
[06:13:14] [PASSED] drm_gem_shmem_test_get_sg_table
[06:13:14] [PASSED] drm_gem_shmem_test_madvise
[06:13:14] [PASSED] drm_gem_shmem_test_purge
[06:13:14] ================== [PASSED] drm_gem_shmem ==================
[06:13:14] === drm_atomic_helper_connector_hdmi_check (22 subtests) ===
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[06:13:14] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[06:13:14] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback
[06:13:14] [PASSED] drm_test_check_max_tmds_rate_format_fallback
[06:13:14] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[06:13:14] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[06:13:14] [PASSED] drm_test_check_output_bpc_dvi
[06:13:14] [PASSED] drm_test_check_output_bpc_format_vic_1
[06:13:14] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[06:13:14] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[06:13:14] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[06:13:14] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[06:13:14] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[06:13:14] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[06:13:14] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[06:13:14] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[06:13:14] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[06:13:14] [PASSED] drm_test_check_broadcast_rgb_value
[06:13:14] [PASSED] drm_test_check_bpc_8_value
[06:13:14] [PASSED] drm_test_check_bpc_10_value
[06:13:14] [PASSED] drm_test_check_bpc_12_value
[06:13:14] [PASSED] drm_test_check_format_value
[06:13:14] [PASSED] drm_test_check_tmds_char_value
[06:13:14] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[06:13:14] ================= drm_managed (2 subtests) =================
[06:13:14] [PASSED] drm_test_managed_release_action
[06:13:14] [PASSED] drm_test_managed_run_action
[06:13:14] =================== [PASSED] drm_managed ===================
[06:13:14] =================== drm_mm (6 subtests) ====================
[06:13:14] [PASSED] drm_test_mm_init
[06:13:14] [PASSED] drm_test_mm_debug
[06:13:14] [PASSED] drm_test_mm_align32
[06:13:14] [PASSED] drm_test_mm_align64
[06:13:14] [PASSED] drm_test_mm_lowest
[06:13:14] [PASSED] drm_test_mm_highest
[06:13:14] ===================== [PASSED] drm_mm ======================
[06:13:14] ============= drm_modes_analog_tv (5 subtests) =============
[06:13:14] [PASSED] drm_test_modes_analog_tv_mono_576i
[06:13:14] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[06:13:14] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[06:13:14] [PASSED] drm_test_modes_analog_tv_pal_576i
[06:13:14] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[06:13:14] =============== [PASSED] drm_modes_analog_tv ===============
stty: 'standard input': Inappropriate ioctl for device
[06:13:14] ============== drm_plane_helper (2 subtests) ===============
[06:13:14] =============== drm_test_check_plane_state  ================
[06:13:14] [PASSED] clipping_simple
[06:13:14] [PASSED] clipping_rotate_reflect
[06:13:14] [PASSED] positioning_simple
[06:13:14] [PASSED] upscaling
[06:13:14] [PASSED] downscaling
[06:13:14] [PASSED] rounding1
[06:13:14] [PASSED] rounding2
[06:13:14] [PASSED] rounding3
[06:13:14] [PASSED] rounding4
[06:13:14] =========== [PASSED] drm_test_check_plane_state ============
[06:13:14] =========== drm_test_check_invalid_plane_state  ============
[06:13:14] [PASSED] positioning_invalid
[06:13:14] [PASSED] upscaling_invalid
[06:13:14] [PASSED] downscaling_invalid
[06:13:14] ======= [PASSED] drm_test_check_invalid_plane_state ========
[06:13:14] ================ [PASSED] drm_plane_helper =================
[06:13:14] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[06:13:14] ====== drm_test_connector_helper_tv_get_modes_check  =======
[06:13:14] [PASSED] None
[06:13:14] [PASSED] PAL
[06:13:14] [PASSED] NTSC
[06:13:14] [PASSED] Both, NTSC Default
[06:13:14] [PASSED] Both, PAL Default
[06:13:14] [PASSED] Both, NTSC Default, with PAL on command-line
[06:13:14] [PASSED] Both, PAL Default, with NTSC on command-line
[06:13:14] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[06:13:14] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[06:13:14] ================== drm_rect (9 subtests) ===================
[06:13:14] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[06:13:14] [PASSED] drm_test_rect_clip_scaled_not_clipped
[06:13:14] [PASSED] drm_test_rect_clip_scaled_clipped
[06:13:14] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[06:13:14] ================= drm_test_rect_intersect  =================
[06:13:14] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[06:13:14] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[06:13:14] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[06:13:14] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[06:13:14] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[06:13:14] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[06:13:14] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[06:13:14] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[06:13:14] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[06:13:14] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[06:13:14] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[06:13:14] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[06:13:14] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[06:13:14] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[06:13:14] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[06:13:14] ============= [PASSED] drm_test_rect_intersect =============
[06:13:14] ================ drm_test_rect_calc_hscale  ================
[06:13:14] [PASSED] normal use
[06:13:14] [PASSED] out of max range
[06:13:14] [PASSED] out of min range
[06:13:14] [PASSED] zero dst
[06:13:14] [PASSED] negative src
[06:13:14] [PASSED] negative dst
[06:13:14] ============ [PASSED] drm_test_rect_calc_hscale ============
[06:13:14] ================ drm_test_rect_calc_vscale  ================
[06:13:14] [PASSED] normal use
[06:13:14] [PASSED] out of max range
[06:13:14] [PASSED] out of min range
[06:13:14] [PASSED] zero dst
[06:13:14] [PASSED] negative src
[06:13:14] [PASSED] negative dst
[06:13:14] ============ [PASSED] drm_test_rect_calc_vscale ============
[06:13:14] ================== drm_test_rect_rotate  ===================
[06:13:14] [PASSED] reflect-x
[06:13:14] [PASSED] reflect-y
[06:13:14] [PASSED] rotate-0
[06:13:14] [PASSED] rotate-90
[06:13:14] [PASSED] rotate-180
[06:13:14] [PASSED] rotate-270
[06:13:14] ============== [PASSED] drm_test_rect_rotate ===============
[06:13:14] ================ drm_test_rect_rotate_inv  =================
[06:13:14] [PASSED] reflect-x
[06:13:14] [PASSED] reflect-y
[06:13:14] [PASSED] rotate-0
[06:13:14] [PASSED] rotate-90
[06:13:14] [PASSED] rotate-180
[06:13:14] [PASSED] rotate-270
[06:13:14] ============ [PASSED] drm_test_rect_rotate_inv =============
[06:13:14] ==================== [PASSED] drm_rect =====================
[06:13:14] ============================================================
[06:13:14] Testing complete. Ran 526 tests: passed: 526
[06:13:14] Elapsed time: 24.505s total, 1.696s configuring, 22.637s building, 0.170s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [06:13:14] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[06:13:16] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json ARCH=um O=.kunit --jobs=48
[06:13:24] Starting KUnit Kernel (1/1)...
[06:13:24] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[06:13:24] ================= ttm_device (5 subtests) ==================
[06:13:24] [PASSED] ttm_device_init_basic
[06:13:24] [PASSED] ttm_device_init_multiple
[06:13:24] [PASSED] ttm_device_fini_basic
[06:13:24] [PASSED] ttm_device_init_no_vma_man
[06:13:24] ================== ttm_device_init_pools  ==================
[06:13:24] [PASSED] No DMA allocations, no DMA32 required
[06:13:24] [PASSED] DMA allocations, DMA32 required
[06:13:24] [PASSED] No DMA allocations, DMA32 required
[06:13:24] [PASSED] DMA allocations, no DMA32 required
[06:13:24] ============== [PASSED] ttm_device_init_pools ==============
[06:13:24] =================== [PASSED] ttm_device ====================
[06:13:24] ================== ttm_pool (8 subtests) ===================
[06:13:24] ================== ttm_pool_alloc_basic  ===================
[06:13:24] [PASSED] One page
[06:13:24] [PASSED] More than one page
[06:13:24] [PASSED] Above the allocation limit
[06:13:24] [PASSED] One page, with coherent DMA mappings enabled
[06:13:24] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[06:13:24] ============== [PASSED] ttm_pool_alloc_basic ===============
[06:13:24] ============== ttm_pool_alloc_basic_dma_addr  ==============
[06:13:24] [PASSED] One page
[06:13:24] [PASSED] More than one page
[06:13:24] [PASSED] Above the allocation limit
[06:13:24] [PASSED] One page, with coherent DMA mappings enabled
[06:13:24] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[06:13:24] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[06:13:24] [PASSED] ttm_pool_alloc_order_caching_match
[06:13:24] [PASSED] ttm_pool_alloc_caching_mismatch
[06:13:24] [PASSED] ttm_pool_alloc_order_mismatch
[06:13:24] [PASSED] ttm_pool_free_dma_alloc
[06:13:24] [PASSED] ttm_pool_free_no_dma_alloc
[06:13:24] [PASSED] ttm_pool_fini_basic
[06:13:24] ==================== [PASSED] ttm_pool =====================
[06:13:24] ================ ttm_resource (8 subtests) =================
[06:13:24] ================= ttm_resource_init_basic  =================
[06:13:24] [PASSED] Init resource in TTM_PL_SYSTEM
[06:13:24] [PASSED] Init resource in TTM_PL_VRAM
[06:13:24] [PASSED] Init resource in a private placement
[06:13:24] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[06:13:24] ============= [PASSED] ttm_resource_init_basic =============
[06:13:24] [PASSED] ttm_resource_init_pinned
[06:13:24] [PASSED] ttm_resource_fini_basic
[06:13:24] [PASSED] ttm_resource_manager_init_basic
[06:13:24] [PASSED] ttm_resource_manager_usage_basic
[06:13:24] [PASSED] ttm_resource_manager_set_used_basic
[06:13:24] [PASSED] ttm_sys_man_alloc_basic
[06:13:24] [PASSED] ttm_sys_man_free_basic
[06:13:24] ================== [PASSED] ttm_resource ===================
[06:13:24] =================== ttm_tt (15 subtests) ===================
[06:13:24] ==================== ttm_tt_init_basic  ====================
[06:13:24] [PASSED] Page-aligned size
[06:13:24] [PASSED] Extra pages requested
[06:13:24] ================ [PASSED] ttm_tt_init_basic ================
[06:13:24] [PASSED] ttm_tt_init_misaligned
[06:13:24] [PASSED] ttm_tt_fini_basic
[06:13:24] [PASSED] ttm_tt_fini_sg
[06:13:24] [PASSED] ttm_tt_fini_shmem
[06:13:24] [PASSED] ttm_tt_create_basic
[06:13:24] [PASSED] ttm_tt_create_invalid_bo_type
[06:13:24] [PASSED] ttm_tt_create_ttm_exists
[06:13:24] [PASSED] ttm_tt_create_failed
[06:13:24] [PASSED] ttm_tt_destroy_basic
[06:13:24] [PASSED] ttm_tt_populate_null_ttm
[06:13:24] [PASSED] ttm_tt_populate_populated_ttm
[06:13:24] [PASSED] ttm_tt_unpopulate_basic
[06:13:24] [PASSED] ttm_tt_unpopulate_empty_ttm
[06:13:24] [PASSED] ttm_tt_swapin_basic
[06:13:24] ===================== [PASSED] ttm_tt ======================
[06:13:24] =================== ttm_bo (14 subtests) ===================
[06:13:24] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[06:13:24] [PASSED] Cannot be interrupted and sleeps
[06:13:24] [PASSED] Cannot be interrupted, locks straight away
[06:13:24] [PASSED] Can be interrupted, sleeps
[06:13:24] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[06:13:24] [PASSED] ttm_bo_reserve_locked_no_sleep
[06:13:24] [PASSED] ttm_bo_reserve_no_wait_ticket
[06:13:24] [PASSED] ttm_bo_reserve_double_resv
[06:13:24] [PASSED] ttm_bo_reserve_interrupted
[06:13:24] [PASSED] ttm_bo_reserve_deadlock
[06:13:24] [PASSED] ttm_bo_unreserve_basic
[06:13:24] [PASSED] ttm_bo_unreserve_pinned
[06:13:24] [PASSED] ttm_bo_unreserve_bulk
[06:13:24] [PASSED] ttm_bo_put_basic
[06:13:24] [PASSED] ttm_bo_put_shared_resv
[06:13:24] [PASSED] ttm_bo_pin_basic
[06:13:24] [PASSED] ttm_bo_pin_unpin_resource
[06:13:24] [PASSED] ttm_bo_multiple_pin_one_unpin
[06:13:24] ===================== [PASSED] ttm_bo ======================
[06:13:24] ============== ttm_bo_validate (22 subtests) ===============
[06:13:24] ============== ttm_bo_init_reserved_sys_man  ===============
[06:13:24] [PASSED] Buffer object for userspace
[06:13:24] [PASSED] Kernel buffer object
[06:13:24] [PASSED] Shared buffer object
[06:13:24] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[06:13:24] ============== ttm_bo_init_reserved_mock_man  ==============
[06:13:24] [PASSED] Buffer object for userspace
[06:13:24] [PASSED] Kernel buffer object
[06:13:24] [PASSED] Shared buffer object
[06:13:24] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[06:13:24] [PASSED] ttm_bo_init_reserved_resv
[06:13:24] ================== ttm_bo_validate_basic  ==================
[06:13:24] [PASSED] Buffer object for userspace
[06:13:24] [PASSED] Kernel buffer object
[06:13:24] [PASSED] Shared buffer object
[06:13:24] ============== [PASSED] ttm_bo_validate_basic ==============
[06:13:24] [PASSED] ttm_bo_validate_invalid_placement
[06:13:24] ============= ttm_bo_validate_same_placement  ==============
[06:13:24] [PASSED] System manager
[06:13:24] [PASSED] VRAM manager
[06:13:24] ========= [PASSED] ttm_bo_validate_same_placement ==========
[06:13:24] [PASSED] ttm_bo_validate_failed_alloc
[06:13:24] [PASSED] ttm_bo_validate_pinned
[06:13:24] [PASSED] ttm_bo_validate_busy_placement
[06:13:24] ================ ttm_bo_validate_multihop  =================
[06:13:24] [PASSED] Buffer object for userspace
[06:13:24] [PASSED] Kernel buffer object
[06:13:24] [PASSED] Shared buffer object
[06:13:24] ============ [PASSED] ttm_bo_validate_multihop =============
[06:13:24] ========== ttm_bo_validate_no_placement_signaled  ==========
[06:13:24] [PASSED] Buffer object in system domain, no page vector
[06:13:24] [PASSED] Buffer object in system domain with an existing page vector
[06:13:24] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[06:13:24] ======== ttm_bo_validate_no_placement_not_signaled  ========
[06:13:24] [PASSED] Buffer object for userspace
[06:13:24] [PASSED] Kernel buffer object
[06:13:24] [PASSED] Shared buffer object
[06:13:24] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[06:13:24] [PASSED] ttm_bo_validate_move_fence_signaled
[06:13:24] ========= ttm_bo_validate_move_fence_not_signaled  =========
[06:13:24] [PASSED] Waits for GPU
[06:13:24] [PASSED] Tries to lock straight away
[06:13:24] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[06:13:24] [PASSED] ttm_bo_validate_swapout
[06:13:24] [PASSED] ttm_bo_validate_happy_evict
[06:13:24] [PASSED] ttm_bo_validate_all_pinned_evict
[06:13:24] [PASSED] ttm_bo_validate_allowed_only_evict
[06:13:24] [PASSED] ttm_bo_validate_deleted_evict
[06:13:24] [PASSED] ttm_bo_validate_busy_domain_evict
[06:13:24] [PASSED] ttm_bo_validate_evict_gutting
[06:13:24] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[06:13:24] ================= [PASSED] ttm_bo_validate =================
[06:13:24] ============================================================
[06:13:24] Testing complete. Ran 102 tests: passed: 102
[06:13:24] Elapsed time: 10.000s total, 1.603s configuring, 7.730s building, 0.570s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#21 lore raw

✗ Fi.CI.BUILD: failure for Display Global Histogram (rev9)

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

Series: Display Global Histogram (rev9)
URL : https://patchwork.freedesktop.org/series/135793/
State : failure

== Summary ==

Error: make failed
CALL scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CC [M] drivers/gpu/drm/i915/display/intel_histogram.o
In file included from ./include/linux/string.h:389,

                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:21,
                 from ./arch/x86/include/asm/irqflags.h:80,
                 from ./include/linux/irqflags.h:18,
                 from ./include/linux/spinlock.h:59,
                 from ./include/linux/kref.h:16,
                 from ./include/drm/drm_device.h:5,
                 from drivers/gpu/drm/i915/display/intel_histogram.c:6:
In function ‘fortify_memcpy_chk’,
    inlined from ‘intel_histogram_handle_int_work’ at drivers/gpu/drm/i915/display/intel_histogram.c:135:4:
./include/linux/fortify-string.h:571:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  571 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:194: drivers/gpu/drm/i915/display/intel_histogram.o] Error 1 make[5]: *** [scripts/Makefile.build:440: drivers/gpu/drm/i915] Error 2
make[4]: *** [scripts/Makefile.build:440: drivers/gpu/drm] Error 2
make[3]: *** [scripts/Makefile.build:440: drivers/gpu] Error 2
make[2]: *** [scripts/Makefile.build:440: drivers] Error 2
make[1]: *** [/home/kbuild2/kernel/Makefile:1989: .] Error 2
make: *** [Makefile:251: __sub-make] Error 2
Build failed, no error log produced

#22 lore raw

✗ CI.Build: failure for Display Global Histogram (rev5)

In reply to Arun R Murthy
== Series Details ==

== Series Details ==

Series: Display Global Histogram (rev5)
URL : https://patchwork.freedesktop.org/series/138867/
State : failure

== Summary ==

CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top.o

  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top_mcache.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml2_top_optimization.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/inc/dml2_debug.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_translation_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_wrapper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_utils.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_compressor.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_regamma_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_csc_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_mem_input_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_transform_v.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_timing_generator.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_hw_sequencer.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/hdcp/hdcp_msg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_scl_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_scl_easf_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_isharp_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_filters.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/spl_fixpt31_32.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/spl/spl_custom_float.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_hw_sequencer.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_sink.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_exports.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_vm_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_edid_parser.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dc/dc_spl_translate.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_table.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/info_packet/info_packet.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv_stat.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_reg.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn20.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn21.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn30.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn301.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn302.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn303.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn31.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn314.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn315.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn316.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn32.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn35.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn351.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn401.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_ddc.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_log.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_transition.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_transition.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_isp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.o
  LD [M]  drivers/gpu/drm/amd/amdgpu/amdgpu.o

make[5]: *** [../scripts/Makefile.build:440: drivers/gpu/drm] Error 2 make[4]: *** [../scripts/Makefile.build:440: drivers/gpu] Error 2 make[3]: *** [../scripts/Makefile.build:440: drivers] Error 2 make[2]: *** [/kernel/Makefile:1989: .] Error 2
make[1]: *** [/kernel/Makefile:251: __sub-make] Error 2 make[1]: Leaving directory '/kernel/build64-default'
make: *** [Makefile:251: __sub-make] Error 2
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel