Display Global histogram
v2 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
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 (5):
drm/i915/display: Add support for histogram drm/i915/display: histogram interrupt handling
Add crtc properties for global histogram drm/i915/histogram: histogram delay counter doesnt reset drm/i915/display/histogram: Histogram changes for Display LNL+
drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_atomic.c | 5 + drivers/gpu/drm/i915/display/intel_crtc.c | 202 +++++++++- drivers/gpu/drm/i915/display/intel_crtc.h | 5 + drivers/gpu/drm/i915/display/intel_display.c | 13 + .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../drm/i915/display/intel_display_types.h | 19 + .../gpu/drm/i915/display/intel_histogram.c | 361 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 107 ++++++ drivers/gpu/drm/i915/i915_reg.h | 5 +- drivers/gpu/drm/xe/Makefile | 1 + 11 files changed, 721 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h
Signature · 1 line
2.25.1
PATCH v2 1/5 drm/i915/display: Add support for histogram
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)
--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 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
@@ -264,6 +264,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
@@ -1537,6 +1537,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 +205 -0
205 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_histogram.h new file +78 -0
78 lines not on this page · raw message
drivers/gpu/drm/xe/Makefile +1 -0
@@ -238,6 +238,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
kernel test robot
build botRe: [PATCHv2 1/5] drm/i915/display: Add support for histogram
kernel test robot noticed the following build errors:
Hi Arun,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-intel/for-linux-next-fixes drm-tip/drm-tip drm-xe/drm-xe-next linus/master v6.11-rc4 next-20240823] [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-i915-display-Add-support-for-histogram/20240821-183453 base: git://anongit.freedesktop.org/drm-intel for-linux-next patch link: https://lore.kernel.org/r/20240821102349.3961986-2-arun.r.murthy%40intel.com patch subject: [PATCHv2 1/5] drm/i915/display: Add support for histogram config: i386-randconfig-051-20240823 (https://download.01.org/0day-ci/archive/20240824/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240824/[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 errors (new ones prefixed by >>):
ld: drivers/gpu/drm/i915/display/intel_histogram.o: in function `intel_histogram_enable':
>> drivers/gpu/drm/i915/display/intel_histogram.c:83: undefined reference to `__udivdi3'
vim +83 drivers/gpu/drm/i915/display/intel_histogram.c
44
45 static int intel_histogram_enable(struct intel_crtc *intel_crtc)
46 {
47 struct drm_i915_private *i915 = to_i915(intel_crtc->base.dev);
48 struct intel_histogram *histogram = intel_crtc->histogram;
49 int pipe = intel_crtc->pipe;
50 u64 res;
51 u32 gbandthreshold;
52
53 if (!histogram)
54 return -EINVAL;
55
56 if (!histogram->can_enable) {
57 return -EINVAL;
58 }
59
60 if (histogram->enable)
61 return 0;
62
63 /* Pipe Dithering should be enabled with GLOBAL_HIST */
64 intel_histogram_enable_dithering(i915, pipe);
65
66 /*
67 * enable DPST_CTL Histogram mode
68 * Clear DPST_CTL Bin Reg function select to TC
69 */
70 intel_de_rmw(i915, DPST_CTL(pipe),
71 DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_IE_HIST_EN |
72 DPST_CTL_HIST_MODE | DPST_CTL_IE_TABLE_VALUE_FORMAT,
73 DPST_CTL_BIN_REG_FUNC_TC | DPST_CTL_IE_HIST_EN |
74 DPST_CTL_HIST_MODE_HSV |
75 DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC);
76
77 /* Re-Visit: check if wait for one vblank is required */
78 drm_crtc_wait_one_vblank(&intel_crtc->base);
79
80 /* TODO: one time programming: Program GuardBand Threshold */
81 res = (intel_crtc->config->hw.adjusted_mode.vtotal *
82 intel_crtc->config->hw.adjusted_mode.htotal);
> 83 gbandthreshold = (res * HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT) /
84 HISTOGRAM_GUARDBAND_PRECISION_FACTOR;
85
86 /* Enable histogram interrupt mode */
87 intel_de_rmw(i915, DPST_GUARD(pipe),
88 DPST_GUARD_THRESHOLD_GB_MASK |
89 DPST_GUARD_INTERRUPT_DELAY_MASK | DPST_GUARD_HIST_INT_EN,
90 DPST_GUARD_THRESHOLD_GB(gbandthreshold) |
91 DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DELAY) |
92 DPST_GUARD_HIST_INT_EN);
93
94 /* Clear pending interrupts has to be done on separate write */
95 intel_de_rmw(i915, DPST_GUARD(pipe),
96 DPST_GUARD_HIST_EVENT_STATUS, 1);
97
98 histogram->enable = true;
99 100 return 0;
101 }
102
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
In reply to Arun R MurthyQuoted 89 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 1/5] drm/i915/display: Add support for histogramStatistics 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)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.hdrivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +16
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#include <drm/drm_device.h> +#include <drm/drm_file.h> + +#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 // 3.0% ofthe pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 // Precision
factor for threshold guardband.drivers/gpu/drm/i915/display/intel_histogram.c new file +9
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915; +bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +};
drivers/gpu/drm/i915/display/intel_histogram.c line 37
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+ +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ + histogram->can_enable = true; + +return 0 ; +} +
Looks like we are totally bypassing crtc_state->dither.
Also I see some comments on dither not being enabled on anything which is not 6bpc. Is that constraint resolved now?
Quoted 16 lines
+static void intel_histogram_enable_dithering(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ enum pipe pipe) +{ + intel_de_rmw(dev_priv, PIPE_MISC(pipe),
PIPE_MISC_DITHER_ENABLE,drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+ PIPE_MISC_DITHER_ENABLE); +} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; +
drivers/gpu/drm/i915/display/intel_histogram.c line 62
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) { +return -EINVAL ; + } + +if (histogram->enable) +return 0 ; +
I don't see in the spec that dither should be enabled, any quick bspec references?
Quoted 272 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* +* enable DPST_CTL Histogram mode +* Clear DPST_CTL Bin Reg function select to TC +*/ + intel_de_rmw(i915, 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 new file +10
-0+DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | + DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); + +/* Re-Visit: check if wait for one vblank is required */ +drm_crtc_wait_one_vblank (&intel_crtc->base); + +/* TODO: one time programming: Program GuardBand Threshold */ + res = (intel_crtc->config->hw.adjusted_mode.vtotal * + intel_crtc->config-Quoted 1 line
hw.adjusted_mode.htotal);
drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ gbandthreshold = (res *
HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT) /
+HISTOGRAM_GUARDBAND_PRECISION_FACTOR;drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +/* Enable histogram interrupt mode */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_THRESHOLD_GB_MASK | + DPST_GUARD_INTERRUPT_DELAY_MASK |
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c new file +2
-0+ DPST_GUARD_THRESHOLD_GB(gbandthreshold) | +
DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DEL AY)|drivers/gpu/drm/i915/display/intel_histogram.c new file +25
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear pending interrupts has to be done on separate write */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); + + histogram->enable = true; + +return 0 ; +} + +static void intel_histogram_disable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; + +if (!histogram) +return ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* Clear pending interrupts and disable interrupts */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_HIST_INT_EN |
DPST_GUARD_HIST_EVENT_STATUS, 0);drivers/gpu/drm/i915/display/intel_histogram.c new file +43
-0+ +/* disable DPST_CTL Histogram mode */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN ,0 ); + + histogram->enable = false; +} + +int intel_histogram_update (struct intel_crtc *intel_crtc,bool enable) +{ +if (enable) +return intel_histogram_enable (intel_crtc); + +intel_histogram_disable (intel_crtc); +return 0 ; +} + +int intel_histogram_set_iet_lut (struct intel_crtc *intel_crtc,u32 +*data) { +struct intel_histogram *histogram = intel_crtc->histogram; +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +int pipe = intel_crtc->pipe; +int i =0 ; + +if (!histogram) +return -EINVAL ; + +if (!histogram->enable) { +drm_err (&i915->drm,"histogram not enabled" ); +return -EINVAL ; + } + +if (!data) { +drm_err (&i915->drm,"enhancement LUT data is NULL" ); +return -EINVAL ; + } + +/* +* Set DPST_CTL Bin Reg function select to IE +* Set DPST_CTL Bin Register Index to 0 +*/ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_BIN_REG_MASK,drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ DPST_CTL_BIN_REG_FUNC_IE |
DPST_CTL_BIN_REG_CLEAR);drivers/gpu/drm/i915/display/intel_histogram.c new file +9
-0+ +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); + } + + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ +/* Once IE is applied, change DPST CTL to TC */ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c new file +28
-0+ +return 0 ; +} + +void intel_histogram_deinit (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +kfree (histogram); +} + +int intel_histogram_init (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram; + +/* Allocate histogram internal struct */ + histogram =kzalloc (sizeof (*histogram),GFP_KERNEL ); +if (!histogram) { +return -ENOMEM ; + } + + intel_crtc->histogram = histogram; + histogram->pipe = intel_crtc->pipe; + histogram->can_enable = false; + + histogram->i915 = i915; + +return 0 ; +}drivers/gpu/drm/i915/display/intel_histogram.h new file +16
-0@@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#ifndef __INTEL_HISTOGRAM_H__ +#define __INTEL_HISTOGRAM_H__ + +#include <linux/types.h> + +struct intel_crtc ; + +/* 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)drivers/gpu/drm/i915/display/intel_histogram.h new file +5
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +2
-0+#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)
+#defineDPST_CTL_BIN_REG_FUNC_IE
REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 1)
+#defineDPST_CTL_BIN_REG_MASKREG_GENMASK(6, 0)+#define
DPST_CTL_BIN_REG_CLEAR
REG_FIELD_PREP(DPST_CTL_BIN_REG_MASK, 0)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
+#defineDPST_CTL_HIST_MODE_YUV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 0)
+#defineDPST_CTL_HIST_MODE_HSV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 1)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#define _DPST_GUARD_A 0x490C8 +#define _DPST_GUARD_B 0x491C8 +#define DPST_GUARD (pipe) _MMIO_PIPE(pipe,
_DPST_GUARD_A,_DPST_GUARD_B)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +6
-0+#define DPST_BIN_BUSY REG_BIT(31) + +#define INTEL_HISTOGRAM_PIPEA 0x90000000 +#define INTEL_HISTOGRAM_PIPEB 0x90000002 +#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \ + INTEL_HISTOGRAM_PIPEA,\
drivers/gpu/drm/i915/display/intel_histogram.h new file +25
-0+ INTEL_HISTOGRAM_PIPEB) + +#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,u32 *data); +int intel_histogram_init (struct intel_crtc *intel_crtc);void +intel_histogram_deinit (struct intel_crtc *intel_crtc); + +#endif /* __INTEL_HISTOGRAM_H__ */ drivers/gpu/drm/xe/Makefile +1
-1@@ -238,6 +238,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 \ --2.25.1
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
Quoted 95 lines
Quoted 95 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 1/5] drm/i915/display: Add support for histogramStatistics 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)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h(quoted diff) +0
-0b/drivers/gpu/drm/i915/Makefile index
c63fa2133ccb..03caf3a24966100644drivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +15
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation */ + +#include <drm/drm_device.h> +#include <drm/drm_file.h> + +#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 // 3.0% ofthe pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 // Precision
factor for threshold guardband.drivers/gpu/drm/i915/display/intel_histogram.c new file +14
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915; +bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 37
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ histogram->can_enable = true; + +return 0 ; +} +Looks like we are totally bypassing
crtc_state->dither.
Also I see some comments on dither not being enabled on anything which is not 6bpc. Is that constraint resolved now?
Crtc_state->dither is used for enabling dithering during the crtc_enable and at this point we are far ahead of that. That restriction is for older platforms(ironlake) and we don't have any such for ADLP+
Quoted 20 lines
Quoted 20 lines
+static void intel_histogram_enable_dithering(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ enum pipe pipe) +{ + intel_de_rmw(dev_priv, PIPE_MISC(pipe),
PIPE_MISC_DITHER_ENABLE,drivers/gpu/drm/i915/display/intel_histogram.c new file +14
-0+ PIPE_MISC_DITHER_ENABLE); +} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; + +if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) {
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 62
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +6
-0+return -EINVAL ; + } + +if (histogram->enable) +return 0 ; +I don't see in the spec that dither should be enabled, any quick bspec references?
Dithering should be enabled by default for ADL+ for DPST. This is an enhancement to avoid artifacts.
Thanks and Regards,
Arun R Murthy
--------------------
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
Quoted 115 lines
-----Original Message-----
From: Murthy, Arun R <[email protected]>
Sent: Thursday, September 12, 2024 2:39 PM
To: Kulkarni, Vandita <[email protected]>; intel- [email protected]
Subject: RE: [PATCHv2 1/5] drm/i915/display: Add support for histogramQuoted 15 lines
Quoted 15 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 1/5] drm/i915/display: Add support for histogramStatistics 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.
Quoted 8 lines
Quoted 8 lines
v2: forward declaration in header file along with error handling (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205++++++++++++++++++
Quoted 47 lines
Quoted 47 lines
.../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h(quoted diff) +0
-0b/drivers/gpu/drm/i915/Makefile index
c63fa2133ccb..03caf3a24966100644drivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +7
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation */ + +#include <drm/drm_device.h> +#include <drm/drm_file.h> +Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +8
-0+#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 //3.0% of
Quoted 2 lines
Quoted 2 lines
the pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 //Precision
Quoted 15 lines
Quoted 15 lines
factor for threshold guardband.
drivers/gpu/drm/i915/display/intel_histogram.c new file +14
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915; +bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 37
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ histogram->can_enable = true; + +return 0 ; +} +Looks like we are totally bypassing
crtc_state->dither. Also I see some comments on dither not being enabled on anything which is not 6bpc. Is that constraint resolved now?
Quoted 4 lines
Crtc_state->ditheris used for enabling dithering during thecrtc_enableand at this point we are far ahead of that.
That restriction is for older platforms(ironlake) and we don't have any such for ADLP+
My first point was why do you need to enable it again separately, if it has been already taken care by crtc_state->dither And second point was, can you please share the bsepc link where we have this requirement of enabling it again, even it it was enabled.
Thanks
Vandita
Quoted 36 lines
Quoted 22 lines
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +2
-0+static void intel_histogram_enable_dithering (struct +drm_i915_private
*dev_priv,drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ enum pipe pipe) +{ + intel_de_rmw(dev_priv, PIPE_MISC(pipe),
PIPE_MISC_DITHER_ENABLE,drivers/gpu/drm/i915/display/intel_histogram.c new file +14
-0+ PIPE_MISC_DITHER_ENABLE); +} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; + +if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) {Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 62
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +6
-0+return -EINVAL ; + } + +if (histogram->enable) +return 0 ; +I don't see in the spec that dither should be enabled, any quick bspec references?
Dithering should be enabled by default for ADL+ for DPST. This is an enhancement to avoid artifacts.
Thanks and Regards,
Arun R Murthy
--------------------
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
Quoted 34 lines
Quoted 29 lines
Quoted 1 line
Quoted 1 line
+#define
HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT300 //3.0% of
Quoted 2 lines
Quoted 2 lines
the pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 //Precision
Quoted 14 lines
Quoted 14 lines
factor for threshold guardband.
drivers/gpu/drm/i915/display/intel_histogram.c new file +13
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915; +bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; }; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 37
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ histogram->can_enable = true; + +return 0 ; +} +Looks like we are totally bypassing
crtc_state->dither. Also I see some comments on dither not being enabled on anything which is not 6bpc. Is that constraint resolved now?Quoted 4 lines
Crtc_state->ditheris used for enabling dithering during thecrtc_enableand at this point we are far ahead of that. That restriction is for older platforms(ironlake) and we don't have any such for ADLP+
Quoted 5 lines
My first point was why do you need to enable it again separately, if it has been already taken care by
crtc_state->ditherAnd second point was, can you please share the bsepc link where we have this requirement of enabling it again, even it it was enabled.
Enabling dithering helps in removing the artifacts in the image and is done as part of improvement. As communicated earlier histogram is a pipe configuration and dithering is a trigger point for histogram.
Thanks and Regards
Arun R Murthy
--------------------
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
In reply to Arun R MurthyQuoted 82 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 1/5] drm/i915/display: Add support for histogramStatistics 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)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.hdrivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +16
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#include <drm/drm_device.h> +#include <drm/drm_file.h> + +#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 // 3.0% of thepipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 // Precision
factor for threshold guardband.
drivers/gpu/drm/i915/display/intel_histogram.c line 21
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915;
Lets use intel_display here instead of i915 as I can see this is mostly being used for reg read/writes Read/write/rmw also work with intel_display well.
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +16
-0+bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ + histogram->can_enable = true; + +return 0 ; +} + +static void intel_histogram_enable_dithering(struct drm_i915_private
Quoted 1 line
*dev_priv,
Use intel_display here
drivers/gpu/drm/i915/display/intel_histogram.c line 42
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ enum pipe pipe) +{ +intel_de_rmw (dev_priv,PIPE_MISC (pipe),PIPE_MISC_DITHER_ENABLE , +PIPE_MISC_DITHER_ENABLE );
So every where below drm_i915_private can be replaced with intel_display Ditto.
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram;
drivers/gpu/drm/i915/display/intel_histogram.c line 58
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; + +if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) { +return -EINVAL ; + }
No need for brackets here now atleast
drivers/gpu/drm/i915/display/intel_histogram.c line 69
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +11
-0+ +if (histogram->enable) +return 0 ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* +* enable DPST_CTL Histogram mode +* Clear DPST_CTL Bin Reg function select to TC +*/
Nit: maybe make it Enable DPST... and If we are mentioning the steps lets add some number or points(-)
Quoted 215 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ intel_de_rmw(i915, 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 new file +11
-0+DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | + DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); + +/* Re-Visit: check if wait for one vblank is required */ +drm_crtc_wait_one_vblank (&intel_crtc->base); + +/* TODO: one time programming: Program GuardBand Threshold */ + res = (intel_crtc->config->hw.adjusted_mode.vtotal * + intel_crtc->config->hw.adjusted_mode.htotal); + gbandthreshold = (res *
HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT) /
+HISTOGRAM_GUARDBAND_PRECISION_FACTOR;drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +/* Enable histogram interrupt mode */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_THRESHOLD_GB_MASK | + DPST_GUARD_INTERRUPT_DELAY_MASK |
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c new file +2
-0+ DPST_GUARD_THRESHOLD_GB(gbandthreshold) | +
DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DELAY)|drivers/gpu/drm/i915/display/intel_histogram.c new file +25
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear pending interrupts has to be done on separate write */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); + + histogram->enable = true; + +return 0 ; +} + +static void intel_histogram_disable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; + +if (!histogram) +return ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* Clear pending interrupts and disable interrupts */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_HIST_INT_EN |
DPST_GUARD_HIST_EVENT_STATUS, 0);drivers/gpu/drm/i915/display/intel_histogram.c new file +53
-0+ +/* disable DPST_CTL Histogram mode */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN ,0 ); + + histogram->enable = false; +} + +int intel_histogram_update (struct intel_crtc *intel_crtc,bool enable) +{ +if (enable) +return intel_histogram_enable (intel_crtc); + +intel_histogram_disable (intel_crtc); +return 0 ; +} + +int intel_histogram_set_iet_lut (struct intel_crtc *intel_crtc,u32 +*data) { +struct intel_histogram *histogram = intel_crtc->histogram; +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +int pipe = intel_crtc->pipe; +int i =0 ; + +if (!histogram) +return -EINVAL ; + +if (!histogram->enable) { +drm_err (&i915->drm,"histogram not enabled" ); +return -EINVAL ; + } + +if (!data) { +drm_err (&i915->drm,"enhancement LUT data is NULL" ); +return -EINVAL ; + } + +/* +* Set DPST_CTL Bin Reg function select to IE +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); + +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); + } + + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ +/* Once IE is applied, change DPST CTL to TC */ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c new file +28
-0+ +return 0 ; +} + +void intel_histogram_deinit (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +kfree (histogram); +} + +int intel_histogram_init (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram; + +/* Allocate histogram internal struct */ + histogram =kzalloc (sizeof (*histogram),GFP_KERNEL ); +if (!histogram) { +return -ENOMEM ; + } + + intel_crtc->histogram = histogram; + histogram->pipe = intel_crtc->pipe; + histogram->can_enable = false; + + histogram->i915 = i915; + +return 0 ; +}drivers/gpu/drm/i915/display/intel_histogram.h new file +16
-0@@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#ifndef __INTEL_HISTOGRAM_H__ +#define __INTEL_HISTOGRAM_H__ + +#include <linux/types.h> + +struct intel_crtc ; + +/* 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)drivers/gpu/drm/i915/display/intel_histogram.h new file +5
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)
+#defineDPST_CTL_BIN_REG_FUNC_IE
REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 1)
+#defineDPST_CTL_BIN_REG_MASKREG_GENMASK(6, 0)+#define
DPST_CTL_BIN_REG_CLEAR
REG_FIELD_PREP(DPST_CTL_BIN_REG_MASK, 0)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
+#defineDPST_CTL_HIST_MODE_YUV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 0)
+#defineDPST_CTL_HIST_MODE_HSV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 1)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#define _DPST_GUARD_A 0x490C8 +#define _DPST_GUARD_B 0x491C8 +#define DPST_GUARD (pipe) _MMIO_PIPE(pipe,
_DPST_GUARD_A,_DPST_GUARD_B)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#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)
drivers/gpu/drm/i915/display/intel_histogram.h line 54
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +7
-0+#define DPST_BIN_BUSY REG_BIT(31) + +#define INTEL_HISTOGRAM_PIPEA 0x90000000 +#define INTEL_HISTOGRAM_PIPEB 0x90000002 +#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \ + INTEL_HISTOGRAM_PIPEA, \ + INTEL_HISTOGRAM_PIPEB)
I don't think this is the right way. Lets have a file for intel_histogram_regs.h and intel_histogram.h That will look a lot cleaner.
Quoted 29 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +24
-0+ +#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,u32 *data); +int intel_histogram_init (struct intel_crtc *intel_crtc);void +intel_histogram_deinit (struct intel_crtc *intel_crtc); + +#endif /* __INTEL_HISTOGRAM_H__ */ drivers/gpu/drm/xe/Makefile index renamed from drivers/gpu/drm/xe/Makefile +0
-0
b9670ae09a9e..424ea43016dd100644
drivers/gpu/drm/xe/Makefile xe-$(CONFIG_DRM_XE_DISPLAY) += \ · line 244
Quoted 7 lines
drivers/gpu/drm/xe/Makefile +1
-0@@ -238,6 +238,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 \
Lets try to separate xe and i915 changes into different patches as well as we can I know its tough to decouple some Changes but the ones that can be done should be.
Regards,
Suraj Kandpal
Quoted 2 lines
--
2.25.1
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
Quoted 96 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Kandpal, Suraj
Sent: Wednesday, September 11, 2024 11:07 AM
To: Murthy, Arun R <[email protected]>; intel- [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: RE: [PATCHv2 1/5] drm/i915/display: Add support for histogramQuoted 8 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 1/5] drm/i915/display: Add support for histogramQuoted 4 lines
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.
Quoted 56 lines
This enhancement factor can be multiplied/added with the incoming pixel data frame.
v2: forward declaration in header file along with error handling (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.h(quoted diff) +0
-0b/drivers/gpu/drm/i915/Makefile index
c63fa2133ccb..03caf3a24966100644drivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +5
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation */ + +#include <drm/drm_device.h> drivers/gpu/drm/i915/display/intel_histogram.c line 15
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+#include <drm/drm_file.h> + +#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 // 3.0% ofthe
Quoted 2 lines
pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 //Precision
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 21
Quoted 5 lines
factor for threshold guardband.
drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915;Lets use
intel_displayhere instead of i915 as I can see this is mostly being used for reg read/writes Read/write/rmw also work withintel_displaywell.
On another look I believe intel_display also is not required here I see intel_crtc is available Almost everywhere hence you can derive it with to_intel_display(crtc)
And derive drm_i915_private wherever we cant avoid it with to_i915(display->drm)
Regards,
Suraj Kandpal
Quoted 339 lines
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +16
-0+bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ + histogram->can_enable = true; + +return 0 ; +} + +static void intel_histogram_enable_dithering(struct drm_i915_privateQuoted 1 line
*dev_priv,Use
intel_displayheredrivers/gpu/drm/i915/display/intel_histogram.c
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ enum pipe pipe) +{ + intel_de_rmw(dev_priv, PIPE_MISC(pipe),
PIPE_MISC_DITHER_ENABLE,drivers/gpu/drm/i915/display/intel_histogram.c line 42
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ PIPE_MISC_DITHER_ENABLE);So every where below
drm_i915_privatecan be replaced withintel_displayDitto.Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram;drivers/gpu/drm/i915/display/intel_histogram.c line 58
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; + +if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) { +return -EINVAL ; + }No need for brackets here now atleast
drivers/gpu/drm/i915/display/intel_histogram.c line 69
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +11
-0+ +if (histogram->enable) +return 0 ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* +* enable DPST_CTL Histogram mode +* Clear DPST_CTL Bin Reg function select to TC +*/ Nit: maybe make it Enable DPST... and If we are mentioning the steps lets add some number or points(-)
Quoted 26 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ intel_de_rmw(i915, 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 new file +10
-0+DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | + DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); + +/* Re-Visit: check if wait for one vblank is required */ +drm_crtc_wait_one_vblank (&intel_crtc->base); + +/* TODO: one time programming: Program GuardBand Threshold */ + res = (intel_crtc->config->hw.adjusted_mode.vtotal * + intel_crtc->config-hw.adjusted_mode.htotal);
drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ gbandthreshold = (res *
HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT) /
+HISTOGRAM_GUARDBAND_PRECISION_FACTOR;drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +/* Enable histogram interrupt mode */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_THRESHOLD_GB_MASK | + DPST_GUARD_INTERRUPT_DELAY_MASK |
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +2
-0+ DPST_GUARD_THRESHOLD_GB(gbandthreshold) | +DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DELA
Y)Quoted 60 lines
|
drivers/gpu/drm/i915/display/intel_histogram.c new file +25
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear pending interrupts has to be done on separate write */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); + + histogram->enable = true; + +return 0 ; +} + +static void intel_histogram_disable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; + +if (!histogram) +return ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* Clear pending interrupts and disable interrupts */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_HIST_INT_EN |
DPST_GUARD_HIST_EVENT_STATUS, 0);drivers/gpu/drm/i915/display/intel_histogram.c new file +33
-0+ +/* disable DPST_CTL Histogram mode */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN ,0 ); + + histogram->enable = false; +} + +int intel_histogram_update (struct intel_crtc *intel_crtc,bool +enable) { +if (enable) +return intel_histogram_enable (intel_crtc); + +intel_histogram_disable (intel_crtc); +return 0 ; +} + +int intel_histogram_set_iet_lut (struct intel_crtc *intel_crtc,u32 +*data) { +struct intel_histogram *histogram = intel_crtc->histogram; +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +int pipe = intel_crtc->pipe; +int i =0 ; + +if (!histogram) +return -EINVAL ; + +if (!histogram->enable) { +drm_err (&i915->drm,"histogram not enabled" ); +return -EINVAL ; + } + +if (!data) {drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+drm_err (&i915->drm,"enhancement LUT data is NULL" ); +return -EINVAL ; + } + +/* +* Set DPST_CTL Bin Reg function select to IE +* Set DPST_CTL Bin Register Index to 0 +*/ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_BIN_REG_MASK,drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ DPST_CTL_BIN_REG_FUNC_IE |
DPST_CTL_BIN_REG_CLEAR);Quoted 74 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +9
-0+ +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); + } + + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c new file +1
-0+ DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ +/* Once IE is applied, change DPST CTL to TC */ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c new file +28
-0+ +return 0 ; +} + +void intel_histogram_deinit (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +kfree (histogram); +} + +int intel_histogram_init (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram; + +/* Allocate histogram internal struct */ + histogram =kzalloc (sizeof (*histogram),GFP_KERNEL ); +if (!histogram) { +return -ENOMEM ; + } + + intel_crtc->histogram = histogram; + histogram->pipe = intel_crtc->pipe; + histogram->can_enable = false; + + histogram->i915 = i915; + +return 0 ; +}drivers/gpu/drm/i915/display/intel_histogram.h new file +15
-0@@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation */ + +#ifndef __INTEL_HISTOGRAM_H__ +#define __INTEL_HISTOGRAM_H__ + +#include <linux/types.h> + +struct intel_crtc ; + +/* 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)drivers/gpu/drm/i915/display/intel_histogram.h new file +5
-0+#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)Quoted 3 lines
+#define
DPST_CTL_EN_MULTIPLICATIVE
REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMATREG_BIT(15)Quoted 39 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +2
-0+#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)
+#defineDPST_CTL_BIN_REG_FUNC_IE
REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 1)
+#defineDPST_CTL_BIN_REG_MASKREG_GENMASK(6, 0)+#define
DPST_CTL_BIN_REG_CLEAR
REG_FIELD_PREP(DPST_CTL_BIN_REG_MASK, 0)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
+#defineDPST_CTL_HIST_MODE_YUV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 0)
+#defineDPST_CTL_HIST_MODE_HSV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 1)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#define _DPST_GUARD_A 0x490C8 +#define _DPST_GUARD_B 0x491C8 +#define DPST_GUARD (pipe) _MMIO_PIPE(pipe,
_DPST_GUARD_A,_DPST_GUARD_B)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#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)drivers/gpu/drm/i915/display/intel_histogram.h
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +6
-0+#define DPST_BIN_BUSY REG_BIT(31) + +#define INTEL_HISTOGRAM_PIPEA 0x90000000 +#define INTEL_HISTOGRAM_PIPEB 0x90000002 +#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \ + INTEL_HISTOGRAM_PIPEA,\
drivers/gpu/drm/i915/display/intel_histogram.h line 54
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.h new file +1
-0+ INTEL_HISTOGRAM_PIPEB)I don't think this is the right way. Lets have a file for
intel_histogram_regs.handintel_histogram.hThat will look a lot cleaner.Quoted 29 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +24
-0+ +#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,u32 +*data);int intel_histogram_init (struct intel_crtc *intel_crtc);void +intel_histogram_deinit (struct intel_crtc *intel_crtc); + +#endif /* __INTEL_HISTOGRAM_H__ */ drivers/gpu/drm/xe/Makefile +0
-0drivers/gpu/drm/xe/Makefile xe-$(CONFIG_DRM_XE_DISPLAY) += \ · line 244
Quoted 7 lines
drivers/gpu/drm/xe/Makefile +1
-0@@ -238,6 +238,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 \Lets try to separate xe and i915 changes into different patches as well as we can I know its tough to decouple some Changes but the ones that can be done should be.
Regards,
Suraj KandpalQuoted 2 lines
--
2.25.1
RE: [PATCHv2 1/5] drm/i915/display: Add support for histogram
In reply to Kandpal, SurajQuoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 21
Quoted 7 lines
pipe's current pixel count.
+#defineHISTOGRAM_GUARDBAND_PRECISION_FACTOR10000 // Precision
factor for threshold guardband.drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915;Lets use
intel_displayhere instead of i915 as I can see this is mostly being used for reg read/writes Read/write/rmw also work withintel_displaywell.
Sure!
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +11
-0+bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ + histogram->can_enable = true;
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +return 0 ; +} + +static void intel_histogram_enable_dithering(struct drm_i915_private
*dev_priv,Use
intel_displayhere
Done
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 42
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ enum pipe pipe) +{ +intel_de_rmw (dev_priv,PIPE_MISC (pipe),PIPE_MISC_DITHER_ENABLE , +PIPE_MISC_DITHER_ENABLE );So every where below
drm_i915_privatecan be replaced withintel_displayDitto.
Done
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +9
-0+} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; +
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 58
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +6
-0+if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) { +return -EINVAL ; + }No need for brackets here now atleast
Done
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +6
-0+ +if (histogram->enable) +return 0 ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe);
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 69
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +/* +* enable DPST_CTL Histogram mode +* Clear DPST_CTL Bin Reg function select to TC +*/ Nit: maybe make it Enable DPST... and If we are mentioning the steps lets add some number or points(-)
Done
Quoted 224 lines
Quoted 25 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +3
-0+ intel_de_rmw(i915, 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 new file +11
-0+DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | + DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); + +/* Re-Visit: check if wait for one vblank is required */ +drm_crtc_wait_one_vblank (&intel_crtc->base); + +/* TODO: one time programming: Program GuardBand Threshold */ + res = (intel_crtc->config->hw.adjusted_mode.vtotal * + intel_crtc->config->hw.adjusted_mode.htotal); + gbandthreshold = (res *
HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT) /
+HISTOGRAM_GUARDBAND_PRECISION_FACTOR;drivers/gpu/drm/i915/display/intel_histogram.c new file +5
-0+ +/* Enable histogram interrupt mode */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_THRESHOLD_GB_MASK | + DPST_GUARD_INTERRUPT_DELAY_MASK |
DPST_GUARD_HIST_INT_EN,Review
Quoted 2 lines
(quoted diff) +2
-0+ DPST_GUARD_THRESHOLD_GB(gbandthreshold) | +
DPST_GUARD_INTERRUPT_DELAY(HISTOGRAM_DEFAULT_GUARDBAND_DELAY)Quoted 60 lines
|
drivers/gpu/drm/i915/display/intel_histogram.c new file +25
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear pending interrupts has to be done on separate write */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); + + histogram->enable = true; + +return 0 ; +} + +static void intel_histogram_disable (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; + +if (!histogram) +return ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* Clear pending interrupts and disable interrupts */ + intel_de_rmw(i915, DPST_GUARD(pipe), + DPST_GUARD_HIST_INT_EN |
DPST_GUARD_HIST_EVENT_STATUS, 0);drivers/gpu/drm/i915/display/intel_histogram.c new file +33
-0+ +/* disable DPST_CTL Histogram mode */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN ,0 ); + + histogram->enable = false; +} + +int intel_histogram_update (struct intel_crtc *intel_crtc,bool +enable) { +if (enable) +return intel_histogram_enable (intel_crtc); + +intel_histogram_disable (intel_crtc); +return 0 ; +} + +int intel_histogram_set_iet_lut (struct intel_crtc *intel_crtc,u32 +*data) { +struct intel_histogram *histogram = intel_crtc->histogram; +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +int pipe = intel_crtc->pipe; +int i =0 ; + +if (!histogram) +return -EINVAL ; + +if (!histogram->enable) { +drm_err (&i915->drm,"histogram not enabled" ); +return -EINVAL ; + } + +if (!data) {drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +10
-0+drm_err (&i915->drm,"enhancement LUT data is NULL" ); +return -EINVAL ; + } + +/* +* Set DPST_CTL Bin Reg function select to IE +* Set DPST_CTL Bin Register Index to 0 +*/ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_BIN_REG_MASK,Review
Quoted 1 line
(quoted diff) +1
-0+ DPST_CTL_BIN_REG_FUNC_IE |
DPST_CTL_BIN_REG_CLEAR);Quoted 116 lines
drivers/gpu/drm/i915/display/intel_histogram.c new file +9
-0+ +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); + } + + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,(quoted diff) +1
-0+ DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c new file +4
-0+ +/* Once IE is applied, change DPST CTL to TC */ + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c new file +28
-0+ +return 0 ; +} + +void intel_histogram_deinit (struct intel_crtc *intel_crtc) { +struct intel_histogram *histogram = intel_crtc->histogram; + +kfree (histogram); +} + +int intel_histogram_init (struct intel_crtc *intel_crtc) { +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram; + +/* Allocate histogram internal struct */ + histogram =kzalloc (sizeof (*histogram),GFP_KERNEL ); +if (!histogram) { +return -ENOMEM ; + } + + intel_crtc->histogram = histogram; + histogram->pipe = intel_crtc->pipe; + histogram->can_enable = false; + + histogram->i915 = i915; + +return 0 ; +}drivers/gpu/drm/i915/display/intel_histogram.h new file +15
-0@@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation */ + +#ifndef __INTEL_HISTOGRAM_H__ +#define __INTEL_HISTOGRAM_H__ + +#include <linux/types.h> + +struct intel_crtc ; + +/* 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)drivers/gpu/drm/i915/display/intel_histogram.h new file +5
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)
+#defineDPST_CTL_BIN_REG_FUNC_IE
REG_FIELD_PREP(DPST_CTL_BIN_REG_FUNC_SEL, 1)
+#defineDPST_CTL_BIN_REG_MASKREG_GENMASK(6, 0)+#define
DPST_CTL_BIN_REG_CLEAR
REG_FIELD_PREP(DPST_CTL_BIN_REG_MASK, 0)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
+#defineDPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC
REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
+#defineDPST_CTL_HIST_MODE_YUV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 0)
+#defineDPST_CTL_HIST_MODE_HSV
REG_FIELD_PREP(DPST_CTL_HIST_MODE, 1)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#define _DPST_GUARD_A 0x490C8 +#define _DPST_GUARD_B 0x491C8 +#define DPST_GUARD (pipe) _MMIO_PIPE(pipe,
_DPST_GUARD_A,_DPST_GUARD_B)drivers/gpu/drm/i915/display/intel_histogram.h new file +3
-0+#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)drivers/gpu/drm/i915/display/intel_histogram.h new file +4
-0+ +#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)drivers/gpu/drm/i915/display/intel_histogram.h
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +6
-0+#define DPST_BIN_BUSY REG_BIT(31) + +#define INTEL_HISTOGRAM_PIPEA 0x90000000 +#define INTEL_HISTOGRAM_PIPEB 0x90000002 +#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \ + INTEL_HISTOGRAM_PIPEA,\
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.h line 54
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.h new file +1
-0+ INTEL_HISTOGRAM_PIPEB)I don't think this is the right way. Lets have a file for
intel_histogram_regs.handintel_histogram.hThat will look a lot cleaner.
Done
Quoted 32 lines
Quoted 32 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +24
-0+ +#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,u32 +*data);int intel_histogram_init (struct intel_crtc *intel_crtc);void +intel_histogram_deinit (struct intel_crtc *intel_crtc); + +#endif /* __INTEL_HISTOGRAM_H__ */ drivers/gpu/drm/xe/Makefile +0
-0@@ -238,6 +238,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \ i915-display/intel_hdcp.o \ i915-display/intel_hdcp_gsc_message.o \ i915-display/intel_hdmi.o \
Quoted 9 lines
drivers/gpu/drm/xe/Makefile xe-$(CONFIG_DRM_XE_DISPLAY) += \ · line 244
Quoted 4 lines
drivers/gpu/drm/xe/Makefile +1
-0+ i915-display/intel_histogram.o \ i915-display/intel_hotplug.o \ i915-display/intel_hotplug_irq.o \ i915-display/intel_hti.o \Lets try to separate xe and i915 changes into different patches as well as we can I know its tough to decouple some Changes but the ones that can be done should be.
Done
Thanks and Regards,
Arun R Murthy
--------------------
Jani Nikula
maintainerRe: [PATCHv2 1/5] drm/i915/display: Add support for histogram
In reply to Arun R MurthyQuoted 310 lines · 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)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_types.h | 2 + .../gpu/drm/i915/display/intel_histogram.c | 205 ++++++++++++++++++ .../gpu/drm/i915/display/intel_histogram.h | 78 +++++++ drivers/gpu/drm/xe/Makefile | 1 + 5 files changed, 287 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.c create mode 100644 drivers/gpu/drm/i915/display/intel_histogram.hdrivers/gpu/drm/i915/Makefile +1
-0@@ -264,6 +264,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@@ -1537,6 +1537,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 +205
-0@@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#include <drm/drm_device.h> +#include <drm/drm_file.h> + +#include "i915_reg.h" +#include "i915_drv.h" +#include "intel_display.h" +#include "intel_histogram.h" +#include "intel_display_types.h" +#include "intel_de.h" + +#define HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT 300 // 3.0% of the pipe's current pixel count. +#define HISTOGRAM_GUARDBAND_PRECISION_FACTOR 10000 // Precision factor for threshold guardband. +#define HISTOGRAM_DEFAULT_GUARDBAND_DELAY 0x04 + +struct intel_histogram { +struct drm_i915_private *i915; +bool enable; +bool can_enable; +enum pipe pipe; +u32 bindata[HISTOGRAM_BIN_COUNT ]; +}; + +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) +{ +struct intel_histogram *histogram = intel_crtc->histogram; + +/* TODO: Restrictions for enabling histogram */ + histogram->can_enable = true; + +return 0 ; +} + +static void intel_histogram_enable_dithering (struct drm_i915_private *dev_priv, +enum pipe pipe) +{ +intel_de_rmw (dev_priv,PIPE_MISC (pipe),PIPE_MISC_DITHER_ENABLE , +PIPE_MISC_DITHER_ENABLE ); +} + +static int intel_histogram_enable (struct intel_crtc *intel_crtc) +{ +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; +u64 res; +u32 gbandthreshold; + +if (!histogram) +return -EINVAL ; + +if (!histogram->can_enable) { +return -EINVAL ; + } + +if (histogram->enable) +return 0 ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* +* enable DPST_CTL Histogram mode +* Clear DPST_CTL Bin Reg function select to TC +*/ +intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | +DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC ); + +/* Re-Visit: check if wait for one vblank is required */ +drm_crtc_wait_one_vblank (&intel_crtc->base); + +/* TODO: one time programming: Program GuardBand Threshold */ + res = (intel_crtc->config->hw.adjusted_mode.vtotal * + intel_crtc->config->hw.adjusted_mode.htotal); + gbandthreshold = (res *HISTOGRAM_GUARDBAND_THRESHOLD_DEFAULT ) / +HISTOGRAM_GUARDBAND_PRECISION_FACTOR ; + +/* Enable histogram interrupt mode */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_THRESHOLD_GB_MASK | +DPST_GUARD_INTERRUPT_DELAY_MASK |DPST_GUARD_HIST_INT_EN , +DPST_GUARD_THRESHOLD_GB (gbandthreshold) | +DPST_GUARD_INTERRUPT_DELAY (HISTOGRAM_DEFAULT_GUARDBAND_DELAY ) | +DPST_GUARD_HIST_INT_EN ); + +/* Clear pending interrupts has to be done on separate write */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); + + histogram->enable = true; + +return 0 ; +} + +static void intel_histogram_disable (struct intel_crtc *intel_crtc) +{ +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram = intel_crtc->histogram; +int pipe = intel_crtc->pipe; + +if (!histogram) +return ; + +/* Pipe Dithering should be enabled with GLOBAL_HIST */ +intel_histogram_enable_dithering (i915, pipe); + +/* Clear pending interrupts and disable interrupts */ +intel_de_rmw (i915,DPST_GUARD (pipe), +DPST_GUARD_HIST_INT_EN |DPST_GUARD_HIST_EVENT_STATUS ,0 ); + +/* disable DPST_CTL Histogram mode */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN ,0 ); + + histogram->enable = false; +} + +int intel_histogram_update (struct intel_crtc *intel_crtc,bool enable) +{ +if (enable) +return intel_histogram_enable (intel_crtc); + +intel_histogram_disable (intel_crtc); +return 0 ; +} + +int intel_histogram_set_iet_lut (struct intel_crtc *intel_crtc,u32 *data) +{ +struct intel_histogram *histogram = intel_crtc->histogram; +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +int pipe = intel_crtc->pipe; +int i =0 ; + +if (!histogram) +return -EINVAL ; + +if (!histogram->enable) { +drm_err (&i915->drm,"histogram not enabled" ); +return -EINVAL ; + } + +if (!data) { +drm_err (&i915->drm,"enhancement LUT data is NULL" ); +return -EINVAL ; + } + +/* +* Set DPST_CTL Bin Reg function select to IE +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); + +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); + } + +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK |DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE |DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL ,DPST_CTL_BIN_REG_FUNC_TC ); + +return 0 ; +} + +void intel_histogram_deinit (struct intel_crtc *intel_crtc) +{ +struct intel_histogram *histogram = intel_crtc->histogram; + +kfree (histogram); +} + +int intel_histogram_init (struct intel_crtc *intel_crtc) +{ +struct drm_i915_private *i915 =to_i915 (intel_crtc->base.dev); +struct intel_histogram *histogram; + +/* Allocate histogram internal struct */ + histogram =kzalloc (sizeof (*histogram),GFP_KERNEL ); +if (!histogram) { +return -ENOMEM ; + } + + intel_crtc->histogram = histogram; + histogram->pipe = intel_crtc->pipe; + histogram->can_enable = false; + + histogram->i915 = i915; + +return 0 ; +}drivers/gpu/drm/i915/display/intel_histogram.h new file +48
-0@@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +/* +* Copyright © 2024 Intel Corporation +*/ + +#ifndef __INTEL_HISTOGRAM_H__ +#define __INTEL_HISTOGRAM_H__ + +#include <linux/types.h> + +struct intel_crtc ; + +/* 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)
drivers/gpu/drm/i915/display/intel_histogram.h line 58
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +10
-0+ +#define INTEL_HISTOGRAM_PIPEA 0x90000000 +#define INTEL_HISTOGRAM_PIPEB 0x90000002 +#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \ + INTEL_HISTOGRAM_PIPEA, \ + INTEL_HISTOGRAM_PIPEB) + +#define HISTOGRAM_BIN_COUNT 32 +#define HISTOGRAM_IET_LENGTH 33 +
Please put registers in a separate _regs.h file.
Quoted 32 lines
drivers/gpu/drm/i915/display/intel_histogram.h new file +20
-0+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,u32 *data); +int intel_histogram_init (struct intel_crtc *intel_crtc); +void intel_histogram_deinit (struct intel_crtc *intel_crtc); + +#endif /* __INTEL_HISTOGRAM_H__ */ drivers/gpu/drm/xe/Makefile +1
-0@@ -238,6 +238,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
Jani Nikula, Intel
PATCH v2 2/5 drm/i915/display: histogram interrupt handling
In reply to Arun R MurthyUpon 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)
--- .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_histogram.c | 80 ++++++++++++++++++- .../gpu/drm/i915/display/intel_histogram.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 5 +- 4 files changed, 89 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_display_irq.c +5 -1
@@ -17,6 +17,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"
@@ -1170,6 +1171,9 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)if (iir &gen8_de_pipe_underrun_mask (dev_priv))intel_cpu_fifo_underrun_irq_handler (dev_priv, pipe); +if (iir &GEN9_PIPE_HISTOGRAM_EVENT ) +intel_histogram_irq_handler (dev_priv, pipe); + fault_errors = iir &gen8_de_pipe_fault_mask (dev_priv);if (fault_errors) drm_err_ratelimited(&dev_priv->drm,
@@ -1701,7 +1705,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 +78 -2
111 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_histogram.h +3 -0
@@ -9,6 +9,8 @@#include <linux/types.h> struct intel_crtc ; +struct drm_i915_private ; +enum pipe ;/* GLOBAL_HIST related registers */ #define _DPST_CTL_A 0x490C0
@@ -70,6 +72,7 @@ enum intel_global_hist_lut { };int intel_histogram_atomic_check (struct intel_crtc *intel_crtc); +void intel_histogram_irq_handler (struct drm_i915_private *i915,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,u32 *data);int intel_histogram_init (struct intel_crtc *intel_crtc);
drivers/gpu/drm/i915/i915_reg.h +3 -2
@@ -1655,7 +1655,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)
@@ -1678,7 +1678,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)
@@ -2516,6 +2516,7 @@#define GEN11_PIPE_PLANE7_FLIP_DONE REG_BIT(18)/* icl/tgl */ #define GEN11_PIPE_PLANE6_FLIP_DONE REG_BIT(17)/* icl/tgl */ #define GEN11_PIPE_PLANE5_FLIP_DONE REG_BIT(16)/* icl+ */ +#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
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 75 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 2/5] drm/i915/display: histogram interrupt handlingUpon 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_crtcbackpointer tointel_histogramstruct (Jani)Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_histogram.c | 80 ++++++++++++++++++- .../gpu/drm/i915/display/intel_histogram.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 5 +- 4 files changed, 89 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display_irq.c +4
-0@@ -17,6 +17,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" @@ -1170,6 +1171,9 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl) if (iir & gen8_de_pipe_underrun_mask(dev_priv)) intel_cpu_fifo_underrun_irq_handler(dev_priv, pipe); +if (iir &GEN9_PIPE_HISTOGRAM_EVENT ) +intel_histogram_irq_handler (dev_priv, pipe); + fault_errors = iir &gen8_de_pipe_fault_mask (dev_priv);drivers/gpu/drm/i915/display/intel_display_irq.c +1
-1if (fault_errors) drm_err_ratelimited(&dev_priv->drm,@@ -1701,7 +1705,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
-0u32 de_port_masked =gen8_de_port_aux_mask (dev_priv);u32 de_port_enables;drivers/gpu/drm/i915/display/intel_histogram.c +2
-1@@ -19,12 +19,83 @@struct intel_histogram {struct drm_i915_private *i915; +struct intel_crtc *crtc; +struct delayed_work handle_histogram_int_work;bool enable;bool can_enable; -enum pipe pipe;u32 bindata[HISTOGRAM_BIN_COUNT ]; };
drivers/gpu/drm/i915/display/intel_histogram.c line 37
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +9
-0+static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; +
If we have PSR enabled looks like this code might straight away break, and PSR being enabled is a common scenario Can we have some checks on enabling this feature if no PSR until we handle this scenario?
Quoted 153 lines
drivers/gpu/drm/i915/display/intel_histogram.c +21
-0+/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +retry: +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); +for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { + dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); +if (dpstbin &DPST_BIN_BUSY ) { +/* +* If DPST_BIN busy bit is set, then set the +* DPST_CTL bin reg index to 0 and proceed +* from beginning. +*/ +if (try++ >=5 ) { +drm_err (&i915->drm, +"Histogram block is busy, failed to read\n"); + intel_de_rmw(i915, DPST_GUARD(intel_crtc- >pipe), +
DPST_GUARD_HIST_EVENT_STATUS, 1);drivers/gpu/drm/i915/display/intel_histogram.c +11
-0+return ; + } + goto retry; + } + histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; +drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , + i, histogram->bindata[i]); + } + +/* Notify user for Histogram rediness */ + if (kobject_uevent_env(&i915->drm.primary->kdev->kobj,
KOBJ_CHANGE,drivers/gpu/drm/i915/display/intel_histogram.c +5
-0+ histogram_event)) + drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); + +/* Enable histogram interrupt */ + intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear histogram interrupt by setting histogram interrupt status bit*/
drivers/gpu/drm/i915/display/intel_histogram.c +18
-0+intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); } + +void intel_histogram_irq_handler (struct drm_i915_private *i915,enum +pipe pipe) { +struct intel_crtc *intel_crtc = +to_intel_crtc (drm_crtc_from_index (&i915->drm, pipe)); +struct intel_histogram *histogram = intel_crtc->histogram; + +if (!histogram->enable) { +drm_err (&i915->drm, +"spurious interrupt, histogram not enabled\n" ); +return ; + } + +queue_delayed_work (i915->unordered_wq, + &histogram->handle_histogram_int_work,0 ); } +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { struct intel_histogram *histogram = intel_crtc->histogram; @@ -120,6 +191,7 @@ static void
intel_histogram_disable(struct intel_crtc *intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +6
-1intel_de_rmw (i915,DPST_CTL (pipe),DPST_CTL_IE_HIST_EN ,0 ); +cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; }@@ -181,6 +253,7 @@ void intel_histogram_deinit(struct intel_crtc *intel_crtc) {struct intel_histogram *histogram = intel_crtc->histogram; +cancel_delayed_work_sync (&histogram- >handle_histogram_int_work);kfree (histogram); }@@ -196,9 +269,12 @@ int intel_histogram_init(struct intel_crtc *intel_crtc) } intel_crtc->histogram = histogram; - histogram->pipe = intel_crtc->pipe; + histogram->crtc = intel_crtc; histogram->can_enable = false; +INIT_DEFERRABLE_WORK (&histogram->handle_histogram_int_work, + intel_histogram_handle_int_work); + histogram->i915 = i915;return 0 ;drivers/gpu/drm/i915/display/intel_histogram.h +4
-0@@ -9,6 +9,8 @@#include <linux/types.h> struct intel_crtc ; +struct drm_i915_private ; +enum pipe ;/* GLOBAL_HIST related registers */ #define _DPST_CTL_A 0x490C0@@ -70,6 +72,7 @@ enum intel_global_hist_lut { };int intel_histogram_atomic_check (struct intel_crtc *intel_crtc); +void intel_histogram_irq_handler (struct drm_i915_private *i915,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, u32 *data); intintel_histogram_init(struct intel_crtc *intel_crtc); diff --gita/drivers/gpu/drm/i915/i915_reg.hb/drivers/gpu/drm/i915/i915_reg.hindex569b461022c5..f7b974691381100644drivers/gpu/drm/i915/i915_reg.h +3
-3@@ -1655,7 +1655,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)@@ -1678,7 +1678,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)@@ -2516,6 +2516,7 @@#define GEN11_PIPE_PLANE7_FLIP_DONE REG_BIT(18)/* icl/tgl */ #define GEN11_PIPE_PLANE6_FLIP_DONE REG_BIT(17)/* icl/tgl */ #define GEN11_PIPE_PLANE5_FLIP_DONE REG_BIT(16)/* icl+ */ +#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
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915;
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 38
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +5
-0+struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; +If we have PSR enabled looks like this code might straight away break, and PSR being enabled is a common scenario Can we have some checks on enabling this feature if no PSR until we handle this scenario?
With PSR enabled histogram event will not be generated as there wont be any statistics. This should have no impact to user and user is not time bound with the histogram event.
This TODO is to handle the histogram generation even in case of PSR enabled with some additional settings.
Thanks and Regards,
Arun R Murthy
-------------------
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 21 lines
-----Original Message-----
From: Murthy, Arun R <[email protected]>
Sent: Thursday, September 12, 2024 3:22 PM
To: Kulkarni, Vandita <[email protected]>; intel- [email protected]
Subject: RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handlingQuoted 1 line
Quoted 1 line
+static void
intel_histogram_handle_int_work(struct work_struct *work){
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 38
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c +8
-0+struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; +If we have PSR enabled looks like this code might straight away break, and PSR being enabled is a common scenario Can we have some checks on enabling this feature if no PSR until we handle this scenario?
Quoted 4 lines
With PSR enabled histogram event will not be generated as there wont be any statistics.
This should have no impact to user and user is not time bound with the histogram event.
Just to get some clarity, does this mean the tests for histogram wont fail on PSR enabled panel with this series ?
Thanks,
Vandita
Quoted 7 lines
This TODO is to handle the histogram generation even in case of PSR enabled with some additional settings.
Thanks and Regards,
Arun R Murthy
-------------------
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
In reply to Arun R MurthyQuoted 10 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 6 lines
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_crtcbackpointer tointel_histogramstruct (Jani)Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)
Typo here "wq"
Quoted 51 lines
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_histogram.c | 80 ++++++++++++++++++- .../gpu/drm/i915/display/intel_histogram.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 5 +- 4 files changed, 89 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display_irq.c +4
-0@@ -17,6 +17,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" @@ -1170,6 +1171,9 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl) if (iir & gen8_de_pipe_underrun_mask(dev_priv)) intel_cpu_fifo_underrun_irq_handler(dev_priv, pipe); +if (iir &GEN9_PIPE_HISTOGRAM_EVENT ) +intel_histogram_irq_handler (dev_priv, pipe); + fault_errors = iir &gen8_de_pipe_fault_mask (dev_priv);drivers/gpu/drm/i915/display/intel_display_irq.c +1
-1if (fault_errors) drm_err_ratelimited(&dev_priv->drm,@@ -1701,7 +1705,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
-0u32 de_port_masked =gen8_de_port_aux_mask (dev_priv);u32 de_port_enables;drivers/gpu/drm/i915/display/intel_histogram.c +0
-0
drivers/gpu/drm/i915/display/intel_histogram.c line 23
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0@@ -19,12 +19,83 @@struct intel_histogram {struct drm_i915_private *i915; +struct intel_crtc *crtc; +struct delayed_work handle_histogram_int_work;
Too long of a name delayed_work should be enough since it will be called as Histogram->delayed_work which is self explanatory
drivers/gpu/drm/i915/display/intel_histogram.c line 33
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-1bool enable;bool can_enable; -enum pipe pipe;u32 bindata[HISTOGRAM_BIN_COUNT ]; }; +static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915;
Lets not use it like this here we have intel_crtc use this to get intel_display by to_intel_display(crtc)
and I don't see the use for i915 since display will do the job
drivers/gpu/drm/i915/display/intel_histogram.c line 43
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10
-0+struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/
You may have to think on how you will be able to get the intel_dp structure here You may need to add it in you histogram structure to get intel_psr structure Then check if psr->enabled
And suspend and resume psr based on that
Something to think about
drivers/gpu/drm/i915/display/intel_histogram.c line 45
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+retry: + intel_de_rmw(i915, DPST_CTL(intel_crtc->pipe),
I915 can be replaced with intel_display . can be also replaced in all other Occurrences of i915 in this patch where we don't need the unordered_wq
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_histogram.c +14
-0+DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0); +for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { + dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); +if (dpstbin &DPST_BIN_BUSY ) { +/* +* If DPST_BIN busy bit is set, then set the +* DPST_CTL bin reg index to 0 and proceed +* from beginning. +*/ +if (try++ >=5 ) { +drm_err (&i915->drm, +"Histogram block is busy, failed to read\n"); + intel_de_rmw(i915, DPST_GUARD(intel_crtc- >pipe), +
DPST_GUARD_HIST_EVENT_STATUS, 1);
drivers/gpu/drm/i915/display/intel_histogram.c line 69
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10
-0+return ; + } + goto retry; + } + histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; +drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , + i, histogram->bindata[i]); + } + +/* Notify user for Histogram rediness */
Typo "readiness"
Quoted 51 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ if (kobject_uevent_env(&i915->drm.primary->kdev->kobj,
KOBJ_CHANGE,drivers/gpu/drm/i915/display/intel_histogram.c +5
-0+ histogram_event)) + drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); + +/* Enable histogram interrupt */ + intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear histogram interrupt by setting histogram interrupt status bit*/
drivers/gpu/drm/i915/display/intel_histogram.c +18
-0+intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); } + +void intel_histogram_irq_handler (struct drm_i915_private *i915,enum +pipe pipe) { +struct intel_crtc *intel_crtc = +to_intel_crtc (drm_crtc_from_index (&i915->drm, pipe)); +struct intel_histogram *histogram = intel_crtc->histogram; + +if (!histogram->enable) { +drm_err (&i915->drm, +"spurious interrupt, histogram not enabled\n" ); +return ; + } + +queue_delayed_work (i915->unordered_wq, + &histogram->handle_histogram_int_work,0 ); } +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { struct intel_histogram *histogram = intel_crtc->histogram; @@ -120,6 +191,7 @@ static void
intel_histogram_disable(struct intel_crtc *intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +2
-0intel_de_rmw (i915,DPST_CTL (pipe),DPST_CTL_IE_HIST_EN ,0 ); +cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; }@@ -181,6 +253,7 @@ void intel_histogram_deinit(struct intel_crtc *intel_crtc) {struct intel_histogram *histogram = intel_crtc->histogram; +cancel_delayed_work_sync (&histogram- >handle_histogram_int_work);kfree (histogram); }
drivers/gpu/drm/i915/display/intel_histogram.c int intel_histogram_init(struct intel_crtc *intel_crtc) · line 272
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-1@@ -196,9 +269,12 @@ int intel_histogram_init(struct intel_crtc *intel_crtc) } intel_crtc->histogram = histogram; - histogram->pipe = intel_crtc->pipe; + histogram->crtc = intel_crtc;
Why even add it in patch 1 to delete it patch 2 lets not add it to begin with, Also we don't need the intel_pipe variable in intel_histogram since it can be derived from Intel_crtc.
Regards,
Suraj Kandpal
Quoted 62 lines
drivers/gpu/drm/i915/display/intel_histogram.c +3
-0histogram->can_enable = false; +INIT_DEFERRABLE_WORK (&histogram->handle_histogram_int_work, + intel_histogram_handle_int_work); + histogram->i915 = i915;return 0 ;drivers/gpu/drm/i915/display/intel_histogram.h +4
-0@@ -9,6 +9,8 @@#include <linux/types.h> struct intel_crtc ; +struct drm_i915_private ; +enum pipe ;/* GLOBAL_HIST related registers */ #define _DPST_CTL_A 0x490C0@@ -70,6 +72,7 @@ enum intel_global_hist_lut { };int intel_histogram_atomic_check (struct intel_crtc *intel_crtc); +void intel_histogram_irq_handler (struct drm_i915_private *i915,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, u32 *data); intintel_histogram_init(struct intel_crtc *intel_crtc); diff --gita/drivers/gpu/drm/i915/i915_reg.hb/drivers/gpu/drm/i915/i915_reg.hindex569b461022c5..f7b974691381100644drivers/gpu/drm/i915/i915_reg.h +3
-3@@ -1655,7 +1655,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)@@ -1678,7 +1678,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)@@ -2516,6 +2516,7 @@#define GEN11_PIPE_PLANE7_FLIP_DONE REG_BIT(18)/* icl/tgl */ #define GEN11_PIPE_PLANE6_FLIP_DONE REG_BIT(17)/* icl/tgl */ #define GEN11_PIPE_PLANE5_FLIP_DONE REG_BIT(16)/* icl+ */ +#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
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 8 lines
Quoted 6 lines
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_crtcbackpointer tointel_histogramstruct (Jani)Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)Typo here "wq"
Done
Quoted 54 lines
drivers/gpu/drm/i915/display/intel_display_irq.c void gen8_de_irq_handler(struct
Quoted 24 lines
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_histogram.c | 80 ++++++++++++++++++- .../gpu/drm/i915/display/intel_histogram.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 5 +- 4 files changed, 89 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display_irq.c +1
-0@@ -17,6 +17,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" @@ -1170,6 +1171,9 @@ void gen8_de_irq_handler(struct
drm_i915_privateQuoted 29 lines
drivers/gpu/drm/i915/display/intel_display_irq.c +3
-0*dev_priv, u32 master_ctl)if (iir &gen8_de_pipe_underrun_mask (dev_priv))intel_cpu_fifo_underrun_irq_handler (dev_priv, pipe); +if (iir &GEN9_PIPE_HISTOGRAM_EVENT ) +intel_histogram_irq_handler (dev_priv, pipe); + fault_errors = iir &gen8_de_pipe_fault_mask (dev_priv);drivers/gpu/drm/i915/display/intel_display_irq.c +1
-1if (fault_errors) drm_err_ratelimited(&dev_priv->drm,@@ -1701,7 +1705,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
-0u32 de_port_masked =gen8_de_port_aux_mask (dev_priv);u32 de_port_enables;drivers/gpu/drm/i915/display/intel_histogram.c +0
-0@@ -19,12 +19,83 @@
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 23
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0struct intel_histogram {struct drm_i915_private *i915; +struct intel_crtc *crtc; +struct delayed_work handle_histogram_int_work;Too long of a name
delayed_workshould be enough since it will be called asHistogram->delayed_workwhich is self explanatory
Done
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-1bool enable;bool can_enable; -enum pipe pipe;u32 bindata[HISTOGRAM_BIN_COUNT ]; };
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 33
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915;Lets not use it like this here we have
intel_crtcuse this to getintel_displaybyto_intel_display(crtc)and I don't see the use for i915 since display will do the job
Done
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_histogram.c +7
-0+struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; + +/* +* TODO: PSR to be exited while reading the Histogram data
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 43
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ You may have to think on how you will be able to get the
intel_dpstructure here You may need to add it in you histogram structure to getintel_psrstructure Then check ifpsr->enabledAnd suspend and resume psr based on that Something to think about
Yes will take this up later.
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 45
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+retry: + intel_de_rmw(i915, DPST_CTL(intel_crtc->pipe),I915 can be replaced with
intel_display. can be also replaced in all other Occurrences of i915 in this patch where we don't need theunordered_wq
Done
Quoted 85 lines
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_histogram.c +14
-0+DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0); +for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { + dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); +if (dpstbin &DPST_BIN_BUSY ) { +/* +* If DPST_BIN busy bit is set, then set the +* DPST_CTL bin reg index to 0 and proceed +* from beginning. +*/ +if (try++ >=5 ) { +drm_err (&i915->drm, +"Histogram block is busy, failed to read\n"); + intel_de_rmw(i915, DPST_GUARD(intel_crtc- >pipe), +
DPST_GUARD_HIST_EVENT_STATUS, 1);drivers/gpu/drm/i915/display/intel_histogram.c line 69
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10
-0+return ; + } + goto retry; + } + histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; +drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , + i, histogram->bindata[i]); + } + +/* Notify user for Histogram rediness */ Typo "readiness"
Quoted 53 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ if (kobject_uevent_env(&i915->drm.primary->kdev->kobj,
KOBJ_CHANGE,drivers/gpu/drm/i915/display/intel_histogram.c +5
-0+ histogram_event)) + drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); + +/* Enable histogram interrupt */ + intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+ DPST_GUARD_HIST_INT_EN); + +/* Clear histogram interrupt by setting histogram interrupt status bit*/
drivers/gpu/drm/i915/display/intel_histogram.c +18
-0+intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); } + +void intel_histogram_irq_handler (struct drm_i915_private *i915,enum +pipe pipe) { +struct intel_crtc *intel_crtc = +to_intel_crtc (drm_crtc_from_index (&i915->drm, pipe)); +struct intel_histogram *histogram = intel_crtc->histogram; + +if (!histogram->enable) { +drm_err (&i915->drm, +"spurious interrupt, histogram not enabled\n" ); +return ; + } + +queue_delayed_work (i915->unordered_wq, + &histogram->handle_histogram_int_work,0 ); } +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) { struct intel_histogram *histogram = intel_crtc->histogram; @@ -120,6 +191,7 @@ static void
intel_histogram_disable(struct intel_crtc *intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +2
-0intel_de_rmw (i915,DPST_CTL (pipe),DPST_CTL_IE_HIST_EN ,0 ); +cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; }@@ -181,6 +253,7 @@ void intel_histogram_deinit(struct intel_crtc *intel_crtc) {struct intel_histogram *histogram = intel_crtc->histogram; +cancel_delayed_work_sync (&histogram- >handle_histogram_int_work);kfree (histogram); }@@ -196,9 +269,12 @@ int intel_histogram_init(struct intel_crtc *intel_crtc) }
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c int intel_histogram_init(struct intel_crtc *intel_crtc) · line 272
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-1intel_crtc->histogram = histogram; - histogram->pipe = intel_crtc->pipe; + histogram->crtc = intel_crtc;Why even add it in patch 1 to delete it patch 2 lets not add it to begin with, Also we don't need the
intel_pipevariable inintel_histogramsince it can be derived fromIntel_crtc.
Done
Thanks and Regards,
Arun R Murthy
---------------------
Jani Nikula
maintainerRe: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
In reply to Arun R MurthyQuoted 51 lines · 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_crtcbackpointer tointel_histogramstruct (Jani)Removed histogram_wq and instead use dev_priv->unodered_eq (Jani)Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_histogram.c | 80 ++++++++++++++++++- .../gpu/drm/i915/display/intel_histogram.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 5 +- 4 files changed, 89 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_display_irq.c +5
-1@@ -17,6 +17,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" @@ -1170,6 +1171,9 @@ void gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)if (iir &gen8_de_pipe_underrun_mask (dev_priv))intel_cpu_fifo_underrun_irq_handler (dev_priv, pipe); +if (iir &GEN9_PIPE_HISTOGRAM_EVENT ) +intel_histogram_irq_handler (dev_priv, pipe); + fault_errors = iir &gen8_de_pipe_fault_mask (dev_priv);if (fault_errors) drm_err_ratelimited(&dev_priv->drm,@@ -1701,7 +1705,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 +0
-0
drivers/gpu/drm/i915/display/intel_histogram.c line 21
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-0@@ -19,12 +19,83 @@struct intel_histogram {struct drm_i915_private *i915;
Don't need this if you have crtc pointer.
drivers/gpu/drm/i915/display/intel_histogram.c line 24
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-1+struct intel_crtc *crtc; +struct delayed_work handle_histogram_int_work;bool enable;bool can_enable; -enum pipe pipe;
Why not add crtc to begin with in patch 1?
drivers/gpu/drm/i915/display/intel_histogram.c line 33
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c +5
-0u32 bindata[HISTOGRAM_BIN_COUNT ]; }; +static void intel_histogram_handle_int_work (struct work_struct *work) +{ +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915;
struct intel_display everywhere in the series.
Quoted 20 lines
drivers/gpu/drm/i915/display/intel_histogram.c +20
-0+struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +retry: +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); +for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { + dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); +if (dpstbin &DPST_BIN_BUSY ) { +/* +* If DPST_BIN busy bit is set, then set the +* DPST_CTL bin reg index to 0 and proceed +* from beginning.
drivers/gpu/drm/i915/display/intel_histogram.c line 63
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10
-0+*/ +if (try++ >=5 ) { +drm_err (&i915->drm, +"Histogram block is busy, failed to read\n" ); +intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); +return ; + } + goto retry; + }
The retry logic seems pretty weird here with the goto. Maybe abstract a separate function to avoid it.
drivers/gpu/drm/i915/display/intel_histogram.c line 66
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+ histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; +drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , + i, histogram->bindata[i]);
What's atomic about this? Also please consider the amount of log spew this generates. If you need to log it, do it in a single hex dump after everything is read.
Quoted 116 lines
drivers/gpu/drm/i915/display/intel_histogram.c +38
-1+ } + +/* Notify user for Histogram rediness */ +if (kobject_uevent_env (&i915->drm.primary->kdev->kobj,KOBJ_CHANGE , + histogram_event)) +drm_err (&i915->drm,"sending HISTOGRAM event failed\n" ); + +/* Enable histogram interrupt */ +intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe),DPST_GUARD_HIST_INT_EN , +DPST_GUARD_HIST_INT_EN ); + +/* Clear histogram interrupt by setting histogram interrupt status bit*/ +intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe), +DPST_GUARD_HIST_EVENT_STATUS ,1 ); +} + +void intel_histogram_irq_handler (struct drm_i915_private *i915,enum pipe pipe) +{ +struct intel_crtc *intel_crtc = +to_intel_crtc (drm_crtc_from_index (&i915->drm, pipe)); +struct intel_histogram *histogram = intel_crtc->histogram; + +if (!histogram->enable) { +drm_err (&i915->drm, +"spurious interrupt, histogram not enabled\n" ); +return ; + } + +queue_delayed_work (i915->unordered_wq, + &histogram->handle_histogram_int_work,0 ); +} +int intel_histogram_atomic_check (struct intel_crtc *intel_crtc) {struct intel_histogram *histogram = intel_crtc->histogram;@@ -120,6 +191,7 @@ static void intel_histogram_disable(struct intel_crtc *intel_crtc)intel_de_rmw (i915,DPST_CTL (pipe),DPST_CTL_IE_HIST_EN ,0 ); +cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; }@@ -181,6 +253,7 @@ void intel_histogram_deinit(struct intel_crtc *intel_crtc) {struct intel_histogram *histogram = intel_crtc->histogram; +cancel_delayed_work_sync (&histogram->handle_histogram_int_work);kfree (histogram); }@@ -196,9 +269,12 @@ int intel_histogram_init(struct intel_crtc *intel_crtc) } intel_crtc->histogram = histogram; - histogram->pipe = intel_crtc->pipe; + histogram->crtc = intel_crtc; histogram->can_enable = false; +INIT_DEFERRABLE_WORK (&histogram->handle_histogram_int_work, + intel_histogram_handle_int_work); + histogram->i915 = i915;return 0 ;drivers/gpu/drm/i915/display/intel_histogram.h +3
-0@@ -9,6 +9,8 @@#include <linux/types.h> struct intel_crtc ; +struct drm_i915_private ; +enum pipe ;/* GLOBAL_HIST related registers */ #define _DPST_CTL_A 0x490C0@@ -70,6 +72,7 @@ enum intel_global_hist_lut { };int intel_histogram_atomic_check (struct intel_crtc *intel_crtc); +void intel_histogram_irq_handler (struct drm_i915_private *i915,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,u32 *data);int intel_histogram_init (struct intel_crtc *intel_crtc);drivers/gpu/drm/i915/i915_reg.h +3
-2@@ -1655,7 +1655,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)@@ -1678,7 +1678,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)@@ -2516,6 +2516,7 @@#define GEN11_PIPE_PLANE7_FLIP_DONE REG_BIT(18)/* icl/tgl */ #define GEN11_PIPE_PLANE6_FLIP_DONE REG_BIT(17)/* icl/tgl */ #define GEN11_PIPE_PLANE5_FLIP_DONE REG_BIT(16)/* icl+ */ +#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
Jani Nikula, Intel
RE: [PATCHv2 2/5] drm/i915/display: histogram interrupt handling
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-0@@ -19,12 +19,83 @@
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 21
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-0struct intel_histogram {struct drm_i915_private *i915;Don't need this if you have crtc pointer.
As part of replacing drm_i915_private with intel_display, this has been taken care of(Comment from Suraj).
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 24
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-1+struct intel_crtc *crtc; +struct delayed_work handle_histogram_int_work;bool enable;bool can_enable; -enum pipe pipe;Why not add crtc to begin with in patch 1?
Done as part of replacing drm_i915_private to intel_dispay(comment from Suraj)
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 33
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c +5
-0u32 bindata[HISTOGRAM_BIN_COUNT ]; }; +static void intel_histogram_handle_int_work (struct work_struct *work) +{ +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915;struct
intel_displayeverywhere in the series.
Done! As part of comments from Suraj.
Quoted 30 lines
drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_histogram.c +13
-0+struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; +u32 dpstbin; +int i, try =0 ; + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +retry: + intel_de_rmw(i915, 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
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c +11
-0+for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { + dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); +if (dpstbin &DPST_BIN_BUSY ) { +/* +* If DPST_BIN busy bit is set, then set the +* DPST_CTL bin reg index to 0 and proceed +* from beginning. +*/ +if (try++ >=5 ) { + drm_err(&i915->drm, + "Histogram block is busy, failed toread\n");
drivers/gpu/drm/i915/display/intel_histogram.c line 60
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+ intel_de_rmw(i915, DPST_GUARD(intel_crtc- pipe), + DPST_GUARD_HIST_EVENT_STATUS,1);
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 63
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+return ; + } + goto retry; + }The retry logic seems pretty weird here with the goto. Maybe abstract a separate function to avoid it.
Done
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_histogram.c line 66
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +3
-0+ histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; +drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , + i, histogram->bindata[i]);What's atomic about this? Also please consider the amount of log spew this generates. If you need to log it, do it in a single hex dump after everything is read.
Will remove this dbg print, may not be required for normal debugging.
Thanks and Regards,
Arun R Murthy
--------------------
PATCH v2 3/5 Add crtc properties for global histogram
In reply to Arun R MurthyCRTC properties have been added for enable/disable histogram, reading the histogram data and writing the IET data. "HISTOGRAM_EN" is the crtc property to enable/disable the global histogram and takes a value 0/1 accordingly.
"Histogram" is a crtc property to read the binary histogram data. "Global IET" is a crtc property to write the IET binary LUT data.
v2: Read the histogram blob data before sending uevent (Jani)
--- drivers/gpu/drm/i915/display/intel_atomic.c | 5 + drivers/gpu/drm/i915/display/intel_crtc.c | 202 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_crtc.h | 5 + drivers/gpu/drm/i915/display/intel_display.c | 13 ++ .../drm/i915/display/intel_display_types.h | 17 ++ .../gpu/drm/i915/display/intel_histogram.c | 7 + 6 files changed, 248 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_atomic.c +5 -0
@@ -246,6 +246,8 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +if (crtc_state->global_iet) +drm_property_blob_get (crtc_state->global_iet);/* copy color blobs */ if (crtc_state->hw.degamma_lut)drm_property_blob_get (crtc_state->hw.degamma_lut);
@@ -277,6 +279,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; crtc_state->dsb =NULL ; + crtc_state->histogram_en_changed = false;return &crtc_state->uapi; }
@@ -312,6 +315,8 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,drm_WARN_ON (crtc->dev, crtc_state->dsb); +if (crtc_state->global_iet) +drm_property_blob_put (crtc_state->global_iet);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi);intel_crtc_free_hw_state (crtc_state);if (crtc_state->dp_tunnel_ref.tunnel)
drivers/gpu/drm/i915/display/intel_crtc.c +201 -1
241 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_crtc.h +5 -0
@@ -7,6 +7,7 @@#define _INTEL_CRTC_H_#include <linux/types.h> +#include <drm/drm_crtc.h> enum i9xx_plane_id ;enum pipe ;
@@ -49,4 +50,8 @@ void intel_wait_for_vblank_if_active(struct drm_i915_private *i915, enum pipe pipe);void intel_crtc_wait_for_next_vblank (struct intel_crtc *crtc); +int intel_crtc_add_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_en_property (struct intel_crtc *intel_crtc); +void intel_attach_global_iet_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_property (struct intel_crtc *intel_crtc);#endif
drivers/gpu/drm/i915/display/intel_display.c +13 -0
@@ -94,6 +94,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"
@@ -4335,6 +4336,10 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,if (ret)return ret; +/* HISTOGRAM changed */ +if (crtc_state->histogram_en_changed) +return intel_histogram_atomic_check (crtc); +return 0 ; }
@@ -7512,6 +7517,14 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)* FIXME get rid of this funny new->old swapping */ old_crtc_state->dsb =fetch_and_zero (&new_crtc_state->dsb); + +/* Re-Visit: HISTOGRAM related stuff */ +if (new_crtc_state->histogram_en_changed) +intel_histogram_update (crtc, + new_crtc_state->histogram_en); +if (new_crtc_state->global_iet_changed) +intel_histogram_set_iet_lut (crtc, + (u32 *)new_crtc_state->global_iet->data); }/* Underruns don't always raise interrupts, so check manually */
drivers/gpu/drm/i915/display/intel_display_types.h +17 -0
@@ -99,6 +99,12 @@ enum intel_broadcast_rgb { INTEL_BROADCAST_RGB_LIMITED, }; +/* HISTOGRAM property */ +enum intel_histogram_en_prop { +INTEL_HISTOGRAM_PROP_DISABLE , +INTEL_HISTOGRAM_PROP_ENABLE , +}; +struct intel_fb_view {/* * The remap information used in the remapped and rotated views to
@@ -1431,6 +1437,13 @@ struct intel_crtc_state {/* LOBF flag */ bool has_lobf; + +/* HISTOGRAM data */ +int histogram_en; +struct drm_property_blob *global_iet; +struct drm_property_blob *histogram; +bool global_iet_changed; +bool histogram_en_changed; };enum intel_pipe_crc_source {
@@ -1538,6 +1551,10 @@ struct intel_crtc {struct pm_qos_request vblank_pm_qos;struct intel_histogram *histogram; +/* HISTOGRAM properties */ +struct drm_property *histogram_en_property; +struct drm_property *global_iet_property; +struct drm_property *histogram_property;#ifdef CONFIG_DEBUG_FS struct intel_pipe_crc pipe_crc;
drivers/gpu/drm/i915/display/intel_histogram.c +7 -0
@@ -66,6 +66,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work) i, histogram->bindata[i]); } +drm_property_replace_global_blob (&i915->drm, + &intel_crtc->config->histogram, +sizeof (histogram->bindata), + histogram->bindata, &intel_crtc->base.base, + intel_crtc->histogram_property); +/* Notify user for Histogram rediness */ if (kobject_uevent_env (&i915->drm.primary->kdev->kobj,KOBJ_CHANGE , histogram_event))
@@ -193,6 +199,7 @@ static void intel_histogram_disable(struct intel_crtc *intel_crtc)cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; + intel_crtc->config->histogram_en = false; }int intel_histogram_update (struct intel_crtc *intel_crtc,bool enable)
Signature · 1 line
2.25.1
RE: [PATCHv2 3/5] Add crtc properties for global histogram
Quoted 142 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 3/5] Add crtc properties for global histogramCRTC properties have been added for enable/disable histogram, reading the histogram data and writing the IET data.
"HISTOGRAM_EN" is the crtc property to enable/disable the global histogram and takes a value 0/1 accordingly.
"Histogram" is a crtc property to read the binary histogram data. "Global IET" is a crtc property to write the IET binary LUT data.v2: Read the histogram blob data before sending uevent (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_atomic.c | 5 + drivers/gpu/drm/i915/display/intel_crtc.c | 202 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_crtc.h | 5 + drivers/gpu/drm/i915/display/intel_display.c | 13 ++ .../drm/i915/display/intel_display_types.h | 17 ++ .../gpu/drm/i915/display/intel_histogram.c | 7 + 6 files changed, 248 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_atomic.c +5
-0@@ -246,6 +246,8 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +if (crtc_state->global_iet) +drm_property_blob_get (crtc_state->global_iet);/* copy color blobs */ if (crtc_state->hw.degamma_lut)drm_property_blob_get (crtc_state->hw.degamma_lut);@@ -277,6 +279,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; crtc_state->dsb =NULL ; + crtc_state->histogram_en_changed = false;return &crtc_state->uapi; }@@ -312,6 +315,8 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,drm_WARN_ON (crtc->dev, crtc_state->dsb); +if (crtc_state->global_iet) +drm_property_blob_put (crtc_state->global_iet);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi);intel_crtc_free_hw_state (crtc_state);if (crtc_state->dp_tunnel_ref.tunnel)drivers/gpu/drm/i915/display/intel_crtc.c +54
-0@@ -10,6 +10,7 @@#include <drm/drm_fourcc.h> #include <drm/drm_plane.h> #include <drm/drm_vblank_work.h> +#include <drm/drm_atomic_uapi.h> #include "i915_vgpu.h" #include "i9xx_plane.h" @@ -26,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" @@ -201,6 +203,7 @@ static struct intel_crtc *intel_crtc_alloc(void) staticvoid intel_crtc_free (struct intel_crtc *crtc) {intel_crtc_destroy_state (&crtc->base, crtc->base.state); +intel_histogram_deinit (crtc);kfree (crtc); }@@ -220,6 +223,100 @@ static int intel_crtc_late_register(struct drm_crtc *crtc)return 0 ; } +static int intel_crtc_get_property (struct drm_crtc *crtc, +const struct drm_crtc_state *state, +struct drm_property *property, +uint64_t *val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +const struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); + +if (property == intel_crtc->histogram_en_property) { + *val = intel_crtc_state->histogram_en; + }else if (property == intel_crtc->global_iet_property) { + *val = (intel_crtc_state->global_iet) ? + intel_crtc_state->global_iet->base.id :0 ; + }else if (property == intel_crtc->histogram_property) { + *val = (intel_crtc_state->histogram) ? + intel_crtc_state->histogram->base.id :0 ; + }else { +drm_err (&i915->drm, +"Unknown property [PROP:%d:%s]\n" , + property->base.id, property->name); +return -EINVAL ; + } + +return 0 ; +} + +static int +intel_atomic_replace_property_blob_from_id (struct drm_device *dev, +struct drm_property_blob **blob, +u64 blob_id, +ssize_t expected_size, +ssize_t expected_elem_size, +bool *replaced) +{ +struct drm_property_blob *new_blob =NULL ; + +if (blob_id !=0 ) { + new_blob =drm_property_lookup_blob (dev, blob_id); +if (!new_blob) +return -EINVAL ; + +if (expected_size >0 && + new_blob->length != expected_size) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } +if (expected_elem_size >0 && + new_blob->length % expected_elem_size !=0 ) { +drm_property_blob_put (new_blob);
drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc · line 287
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+return -EINVAL ; + } + } + + *replaced |=drm_property_replace_blob (blob, new_blob); +drm_property_blob_put (new_blob); + +return 0 ; +} +
Can we align this design to what we have for get property with similar pattern of if else logic and return 0.
Quoted 40 lines
drivers/gpu/drm/i915/display/intel_crtc.c +29
-0+static int intel_crtc_set_property (struct drm_crtc *crtc, +struct drm_crtc_state *state, +struct drm_property *property, +u64 val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +bool replaced = false; + +if (property == intel_crtc->histogram_en_property) { + intel_crtc_state->histogram_en = val; + intel_crtc_state->histogram_en_changed = true; +return 0 ; + } + +if (property == intel_crtc->global_iet_property) { +intel_atomic_replace_property_blob_from_id (crtc->dev, + &intel_crtc_state- >global_iet, + val, +sizeof (uint32_t ) *HISTOGRAM_IET_LENGTH , +-1 , &replaced); +if (replaced) + intel_crtc_state->global_iet_changed = true; +return 0 ; + } + + drm_dbg_atomic(&i915->drm, "Unknown property[PROP:%d:%s]\n",
drivers/gpu/drm/i915/display/intel_crtc.c +4
-0+ property->base.id, property->name); +return -EINVAL ; +} +#define INTEL_CRTC_FUNCS \ .set_config = drm_atomic_helper_set_config, \ .destroy = intel_crtc_destroy, \
drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc · line 332
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_crtc.c +3
-1@@ -229,7 +326,9 @@ static int intel_crtc_late_register(struct drm_crtc *crtc) .set_crc_source = intel_crtc_set_crc_source, \ .verify_crc_source = intel_crtc_verify_crc_source, \ .get_crc_sources = intel_crtc_get_crc_sources, \ - .late_register = intel_crtc_late_register + .late_register = intel_crtc_late_register, \ + .atomic_set_property = intel_crtc_set_property, \ + .atomic_get_property = intel_crtc_get_property
+drm-devel
Can this be made drm crtc property as histogram is generic?
Quoted 259 lines
drivers/gpu/drm/i915/display/intel_crtc.c +4
-0static const struct drm_crtc_funcs bdw_crtc_funcs = {INTEL_CRTC_FUNCS ,@@ -374,6 +473,10 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)intel_color_crtc_init (crtc );intel_drrs_crtc_init (crtc);intel_crtc_crc_init (crtc); +intel_histogram_init (crtc); + +/* Initialize crtc properties */ +intel_crtc_add_property (crtc); cpu_latency_qos_add_request(&crtc->vblank_pm_qos,
PM_QOS_DEFAULT_VALUE);drivers/gpu/drm/i915/display/intel_crtc.c +10
-0@@ -690,3 +793,100 @@ void intel_pipe_update_end(structintel_atomic_state *state, out:intel_psr_unlock (new_crtc_state ); } + +static const struct drm_prop_enum_list histogram_en_names[] = { + {INTEL_HISTOGRAM_DISABLE ,"Disable" }, + {INTEL_HISTOGRAM_ENABLE ,"Enable" }, +}; + +/** +* intel_attach_histogram_en_property() - add property to +enable/disable histogram +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram is to
+ * be enabled/disabled
+ *
+ * "HISTOGRAM_EN" is the crtc propety to enable/disable globaldrivers/gpu/drm/i915/display/intel_crtc.c +12
-0+histogram */ void intel_attach_histogram_en_property (struct intel_crtc +*intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->histogram_en_property; +if (!prop) { + prop = drm_property_create_enum(dev, 0, + "HISTOGRAM_EN", + histogram_en_names, +ARRAY_SIZE(histogram_en_names));drivers/gpu/drm/i915/display/intel_crtc.c +24
-0+if (!prop) +return ; + + intel_crtc->histogram_en_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_global_iet_property() - add property to write Image +Enhancement data +* @intel_crtc: pointer to the struct intel_crtc on which global +histogram is enabled +* +* "Global IET" is the crtc property to write the Image Enhancement LUT +binary data */ void intel_attach_global_iet_property (struct intel_crtc +*intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->global_iet_property; +if (!prop) { + prop = drm_property_create(dev, DRM_MODE_PROP_BLOB|
DRM_MODE_PROP_ATOMIC,drivers/gpu/drm/i915/display/intel_crtc.c +24
-0+ "Global IET", 0); +if (!prop) +return ; + + intel_crtc->global_iet_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_histogram_property() - crtc property to read the histogram. +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram +* was enabled. +* "Global Histogram" is the crtc property to read the binary histogram data. +*/ +void intel_attach_histogram_property (struct intel_crtc *intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; +struct drm_property_blob *blob; + + prop = intel_crtc->histogram_property; +if (!prop) { + prop = drm_property_create(dev, DRM_MODE_PROP_BLOB|
drivers/gpu/drm/i915/display/intel_crtc.c +9
-0+DRM_MODE_PROP_ATOMIC | +DRM_MODE_PROP_IMMUTABLE , + "Global Histogram", 0); +if (!prop) +return ; + + intel_crtc->histogram_property = prop; + } + blob = drm_property_create_blob(dev, sizeof(uint32_t) *
HISTOGRAM_BIN_COUNT, NULL);drivers/gpu/drm/i915/display/intel_crtc.c +11
-0+ intel_crtc->config->histogram = blob; + +drm_object_attach_property (&crtc->base, prop, blob->base.id); } + +int intel_crtc_add_property (struct intel_crtc *intel_crtc) { +intel_attach_histogram_en_property (intel_crtc); +intel_attach_histogram_property (intel_crtc); +intel_attach_global_iet_property (intel_crtc); + +return 0 ; +}drivers/gpu/drm/i915/display/intel_crtc.h +5
-0@@ -7,6 +7,7 @@#define _INTEL_CRTC_H_#include <linux/types.h> +#include <drm/drm_crtc.h> enum i9xx_plane_id ;enum pipe ;@@ -49,4 +50,8 @@ void intel_wait_for_vblank_if_active(structdrm_i915_private *i915, enum pipe pipe);void intel_crtc_wait_for_next_vblank (struct intel_crtc *crtc); +int intel_crtc_add_property (struct intel_crtc *intel_crtc);void +intel_attach_histogram_en_property (struct intel_crtc *intel_crtc);void +intel_attach_global_iet_property (struct intel_crtc *intel_crtc);void +intel_attach_histogram_property (struct intel_crtc *intel_crtc);#endif
drivers/gpu/drm/i915/display/intel_display.c +13
-0@@ -94,6 +94,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" @@ -4335,6 +4336,10 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, if (ret) return ret; +/* HISTOGRAM changed */ +if (crtc_state->histogram_en_changed) +return intel_histogram_atomic_check (crtc); +return 0 ; }@@ -7512,6 +7517,14 @@ static void intel_atomic_commit_tail(structintel_atomic_state *state) * FIXME get rid of this funny new->old swapping */ old_crtc_state->dsb =fetch_and_zero (&new_crtc_state- >dsb); + +/* Re-Visit: HISTOGRAM related stuff */ +if (new_crtc_state->histogram_en_changed) +intel_histogram_update (crtc, + new_crtc_state->histogram_en); +if (new_crtc_state->global_iet_changed) +intel_histogram_set_iet_lut (crtc, + (u32 *)new_crtc_state- >global_iet->data);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.hindex79d34d6d537d..ddf1cb0ab26d100644drivers/gpu/drm/i915/display/intel_display_types.h +17
-0@@ -99,6 +99,12 @@ enum intel_broadcast_rgb { INTEL_BROADCAST_RGB_LIMITED, }; +/* HISTOGRAM property */ +enum intel_histogram_en_prop { +INTEL_HISTOGRAM_PROP_DISABLE , +INTEL_HISTOGRAM_PROP_ENABLE , +}; +struct intel_fb_view {/* * The remap information used in the remapped and rotated views to @@ -1431,6 +1437,13 @@ struct intel_crtc_state {/* LOBF flag */ bool has_lobf; + +/* HISTOGRAM data */ +int histogram_en; +struct drm_property_blob *global_iet; +struct drm_property_blob *histogram; +bool global_iet_changed; +bool histogram_en_changed; };enum intel_pipe_crc_source {@@ -1538,6 +1551,10 @@ struct intel_crtc {struct pm_qos_request vblank_pm_qos;struct intel_histogram *histogram; +/* HISTOGRAM properties */ +struct drm_property *histogram_en_property; +struct drm_property *global_iet_property; +struct drm_property *histogram_property;#ifdef CONFIG_DEBUG_FS struct intel_pipe_crc pipe_crc;drivers/gpu/drm/i915/display/intel_histogram.c +6
-0@@ -66,6 +66,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work) i, histogram->bindata[i]); } +drm_property_replace_global_blob (&i915->drm, + &intel_crtc->config->histogram, +sizeof (histogram->bindata), + histogram->bindata, &intel_crtc->base.base, + intel_crtc->histogram_property); +/* Notify user for Histogram rediness */ if (kobject_uevent_env(&i915->drm.primary->kdev->kobj,
KOBJ_CHANGE,drivers/gpu/drm/i915/display/intel_histogram.c +1
-0histogram_event))@@ -193,6 +199,7 @@ static void intel_histogram_disable(struct intel_crtc *intel_crtc)cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; + intel_crtc->config->histogram_en = false; }int
intel_histogram_update(struct intel_crtc *intel_crtc, bool enable)
--
2.25.1
RE: [PATCHv2 3/5] Add crtc properties for global histogram
+dri-devel
Quoted 483 lines
-----Original Message-----
From: Kulkarni, Vandita
Sent: Tuesday, September 3, 2024 10:54 AM
To: Arun R Murthy <[email protected]>; intel- [email protected]; [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: RE: [PATCHv2 3/5] Add crtc properties for global histogramQuoted 143 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 3/5] Add crtc properties for global histogramCRTC properties have been added for enable/disable histogram, reading the histogram data and writing the IET data. "
HISTOGRAM_EN" is the crtc property to enable/disable the global histogram and takes a value 0/1 accordingly.
"Histogram" is a crtc property to read the binary histogram data. "Global IET" is a crtc property to write the IET binary LUT data.v2: Read the histogram blob data before sending uevent (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_atomic.c | 5 + drivers/gpu/drm/i915/display/intel_crtc.c | 202 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_crtc.h | 5 + drivers/gpu/drm/i915/display/intel_display.c | 13 ++ .../drm/i915/display/intel_display_types.h | 17 ++ .../gpu/drm/i915/display/intel_histogram.c | 7 + 6 files changed, 248 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_atomic.c +5
-0@@ -246,6 +246,8 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +if (crtc_state->global_iet) +drm_property_blob_get (crtc_state->global_iet);/* copy color blobs */ if (crtc_state->hw.degamma_lut)drm_property_blob_get (crtc_state->hw.degamma_lut);@@ -277,6 +279,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; crtc_state->dsb =NULL ; + crtc_state->histogram_en_changed = false;return &crtc_state->uapi; }@@ -312,6 +315,8 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,drm_WARN_ON (crtc->dev, crtc_state->dsb); +if (crtc_state->global_iet) +drm_property_blob_put (crtc_state->global_iet);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi);intel_crtc_free_hw_state (crtc_state);if (crtc_state->dp_tunnel_ref.tunnel)drivers/gpu/drm/i915/display/intel_crtc.c +3
-0@@ -10,6 +10,7 @@#include <drm/drm_fourcc.h> #include <drm/drm_plane.h> #include <drm/drm_vblank_work.h> +#include <drm/drm_atomic_uapi.h> #include "i915_vgpu.h" #include "i9xx_plane.h" @@ -26,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" @@ -201,6 +203,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_deinit (crtc);kfree (crtc); }@@ -220,6 +223,100 @@ static int intel_crtc_late_register(struct
drm_crtc
*crtc)drivers/gpu/drm/i915/display/intel_crtc.c +51
-0return 0 ; } +static int intel_crtc_get_property (struct drm_crtc *crtc, +const struct drm_crtc_state *state, +struct drm_property *property, +uint64_t *val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +const struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); + +if (property == intel_crtc->histogram_en_property) { + *val = intel_crtc_state->histogram_en; + }else if (property == intel_crtc->global_iet_property) { + *val = (intel_crtc_state->global_iet) ? + intel_crtc_state->global_iet->base.id :0 ; + }else if (property == intel_crtc->histogram_property) { + *val = (intel_crtc_state->histogram) ? + intel_crtc_state->histogram->base.id :0 ; + }else { +drm_err (&i915->drm, +"Unknown property [PROP:%d:%s]\n" , + property->base.id, property->name); +return -EINVAL ; + } + +return 0 ; +} + +static int +intel_atomic_replace_property_blob_from_id (struct drm_device *dev, +struct drm_property_blob **blob, +u64 blob_id, +ssize_t expected_size, +ssize_t expected_elem_size, +bool *replaced) +{ +struct drm_property_blob *new_blob =NULL ; + +if (blob_id !=0 ) { + new_blob =drm_property_lookup_blob (dev, blob_id); +if (!new_blob) +return -EINVAL ; + +if (expected_size >0 && + new_blob->length != expected_size) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } +if (expected_elem_size >0 && + new_blob->length % expected_elem_size !=0 ) { +drm_property_blob_put (new_blob);drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc *crtc) · line 286
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+return -EINVAL ; + } + } + + *replaced |=drm_property_replace_blob (blob, new_blob); +drm_property_blob_put (new_blob); + +return 0 ; +} +Can we align this design to what we have for get property with similar pattern of if else logic and return 0.
Quoted 42 lines
drivers/gpu/drm/i915/display/intel_crtc.c +20
-0+static int intel_crtc_set_property (struct drm_crtc *crtc, +struct drm_crtc_state *state, +struct drm_property *property, +u64 val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +bool replaced = false; + +if (property == intel_crtc->histogram_en_property) { + intel_crtc_state->histogram_en = val; + intel_crtc_state->histogram_en_changed = true; +return 0 ; + } + +if (property == intel_crtc->global_iet_property) { + intel_atomic_replace_property_blob_from_id(crtc->dev, + &intel_crtc_state-Quoted 1 line
global_iet,drivers/gpu/drm/i915/display/intel_crtc.c +2
-0+ val, + sizeof(uint32_t) *
HISTOGRAM_IET_LENGTH,drivers/gpu/drm/i915/display/intel_crtc.c +7
-0+ -1, &replaced); +if (replaced) + intel_crtc_state->global_iet_changed = true; +return 0 ; + } + + drm_dbg_atomic(&i915->drm, "Unknown property[PROP:%d:%s]\n",
drivers/gpu/drm/i915/display/intel_crtc.c +4
-0+ property->base.id, property->name); +return -EINVAL ; +} +#define INTEL_CRTC_FUNCS \ .set_config = drm_atomic_helper_set_config, \ .destroy = intel_crtc_destroy, \@@ -229,7 +326,9 @@ static int intel_crtc_late_register(struct
drm_crtc
*crtc)drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc *crtc) · line 331
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_crtc.c +3
-1.set_crc_source = intel_crtc_set_crc_source, \ .verify_crc_source = intel_crtc_verify_crc_source, \ .get_crc_sources = intel_crtc_get_crc_sources, \ - .late_register = intel_crtc_late_register + .late_register = intel_crtc_late_register, \ + .atomic_set_property = intel_crtc_set_property, \ + .atomic_get_property = intel_crtc_get_property+dri-devel
Can this be made drm crtc property as histogram is generic?
Quoted 76 lines
static const struct
drm_crtc_funcsbdw_crtc_funcs= {drivers/gpu/drm/i915/display/intel_crtc.c +4
-0INTEL_CRTC_FUNCS,@@ -374,6 +473,10 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)intel_color_crtc_init (crtc );intel_drrs_crtc_init (crtc);intel_crtc_crc_init (crtc); +intel_histogram_init (crtc); + +/* Initialize crtc properties */ +intel_crtc_add_property (crtc); cpu_latency_qos_add_request(&crtc->vblank_pm_qos,
PM_QOS_DEFAULT_VALUE);drivers/gpu/drm/i915/display/intel_crtc.c +10
-0@@ -690,3 +793,100 @@ void intel_pipe_update_end(structintel_atomic_state *state, out:intel_psr_unlock (new_crtc_state ); } + +static const struct drm_prop_enum_list histogram_en_names[] = { + {INTEL_HISTOGRAM_DISABLE ,"Disable" }, + {INTEL_HISTOGRAM_ENABLE ,"Enable" }, }; + +/** +* intel_attach_histogram_en_property() - add property to +enable/disable histogram +* @intel_crtc: pointer to the struct intel_crtc on which the global +histogram is to
+ * be enabled/disabled
+ *
+ * "HISTOGRAM_EN" is the crtc propety to enable/disable globaldrivers/gpu/drm/i915/display/intel_crtc.c +13
-0+histogram */ void intel_attach_histogram_en_property (struct +intel_crtc +*intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->histogram_en_property; +if (!prop) { + prop = drm_property_create_enum(dev, 0, + "HISTOGRAM_EN", + histogram_en_names, +ARRAY_SIZE(histogram_en_names));drivers/gpu/drm/i915/display/intel_crtc.c +25
-0+if (!prop) +return ; + + intel_crtc->histogram_en_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_global_iet_property() - add property to write Image +Enhancement data +* @intel_crtc: pointer to the struct intel_crtc on which global +histogram is enabled +* +* "Global IET" is the crtc property to write the Image Enhancement +LUT binary data */ void intel_attach_global_iet_property (struct +intel_crtc +*intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->global_iet_property; +if (!prop) { + prop = drm_property_create(dev, DRM_MODE_PROP_BLOB|
DRM_MODE_PROP_ATOMIC,drivers/gpu/drm/i915/display/intel_crtc.c +1
-0+ "Global IET", 0);drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+if (!prop) +return ; + + intel_crtc->global_iet_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_histogram_property() - crtc property to read the histogram.
Quoted 1 line
+ * @intel_crtc: pointer to the struct
intel_crtcon which the globalhistogram
Quoted 2 lines
+ * was enabled.
+ * "Global Histogram" is the crtc property to read the binary histogramdata.
Quoted 174 lines
+ */
drivers/gpu/drm/i915/display/intel_crtc.c +9
-0+void intel_attach_histogram_property (struct intel_crtc *intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; +struct drm_property_blob *blob; + + prop = intel_crtc->histogram_property; +if (!prop) { + prop = drm_property_create(dev, DRM_MODE_PROP_BLOB|
drivers/gpu/drm/i915/display/intel_crtc.c +9
-0+DRM_MODE_PROP_ATOMIC | +DRM_MODE_PROP_IMMUTABLE , + "Global Histogram", 0); +if (!prop) +return ; + + intel_crtc->histogram_property = prop; + } + blob = drm_property_create_blob(dev, sizeof(uint32_t) *
HISTOGRAM_BIN_COUNT, NULL);drivers/gpu/drm/i915/display/intel_crtc.c +11
-0+ intel_crtc->config->histogram = blob; + +drm_object_attach_property (&crtc->base, prop, blob->base.id); } + +int intel_crtc_add_property (struct intel_crtc *intel_crtc) { +intel_attach_histogram_en_property (intel_crtc); +intel_attach_histogram_property (intel_crtc); +intel_attach_global_iet_property (intel_crtc); + +return 0 ; +}drivers/gpu/drm/i915/display/intel_crtc.h +5
-0@@ -7,6 +7,7 @@#define _INTEL_CRTC_H_#include <linux/types.h> +#include <drm/drm_crtc.h> enum i9xx_plane_id ;enum pipe ;@@ -49,4 +50,8 @@ void intel_wait_for_vblank_if_active(structdrm_i915_private *i915, enum pipe pipe);void intel_crtc_wait_for_next_vblank (struct intel_crtc *crtc); +int intel_crtc_add_property (struct intel_crtc *intel_crtc);void +intel_attach_histogram_en_property (struct intel_crtc *intel_crtc); +void intel_attach_global_iet_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_property (struct intel_crtc *intel_crtc);#endif
drivers/gpu/drm/i915/display/intel_display.c +13
-0@@ -94,6 +94,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" @@ -4335,6 +4336,10 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, if (ret) return ret; +/* HISTOGRAM changed */ +if (crtc_state->histogram_en_changed) +return intel_histogram_atomic_check (crtc); +return 0 ; }@@ -7512,6 +7517,14 @@ static void intel_atomic_commit_tail(structintel_atomic_state *state) * FIXME get rid of this funny new->old swapping */ old_crtc_state->dsb =fetch_and_zero (&new_crtc_state- >dsb); + +/* Re-Visit: HISTOGRAM related stuff */ +if (new_crtc_state->histogram_en_changed) +intel_histogram_update (crtc, + new_crtc_state->histogram_en); +if (new_crtc_state->global_iet_changed) +intel_histogram_set_iet_lut (crtc, + (u32 *)new_crtc_state- >global_iet->data);drivers/gpu/drm/i915/display/intel_display.c +0
-0}/* Underruns don't always raise interrupts, so check manually */ drivers/gpu/drm/i915/display/intel_display_types.h +17
-0@@ -99,6 +99,12 @@ enum intel_broadcast_rgb { INTEL_BROADCAST_RGB_LIMITED, }; +/* HISTOGRAM property */ +enum intel_histogram_en_prop { +INTEL_HISTOGRAM_PROP_DISABLE , +INTEL_HISTOGRAM_PROP_ENABLE , +}; +struct intel_fb_view {/* * The remap information used in the remapped and rotated views to @@ -1431,6 +1437,13 @@ struct intel_crtc_state {/* LOBF flag */ bool has_lobf; + +/* HISTOGRAM data */ +int histogram_en; +struct drm_property_blob *global_iet; +struct drm_property_blob *histogram; +bool global_iet_changed; +bool histogram_en_changed; };enum intel_pipe_crc_source {@@ -1538,6 +1551,10 @@ struct intel_crtc {struct pm_qos_request vblank_pm_qos;struct intel_histogram *histogram; +/* HISTOGRAM properties */ +struct drm_property *histogram_en_property; +struct drm_property *global_iet_property; +struct drm_property *histogram_property;#ifdef CONFIG_DEBUG_FS struct intel_pipe_crc pipe_crc;drivers/gpu/drm/i915/display/intel_histogram.c +6
-0@@ -66,6 +66,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work) i, histogram->bindata[i]); } +drm_property_replace_global_blob (&i915->drm, + &intel_crtc->config->histogram, +sizeof (histogram->bindata), + histogram->bindata, &intel_crtc->base.base, + intel_crtc->histogram_property); +/* Notify user for Histogram rediness */ if (kobject_uevent_env(&i915->drm.primary->kdev->kobj,
KOBJ_CHANGE,drivers/gpu/drm/i915/display/intel_histogram.c +0
-0histogram_event))@@ -193,6 +199,7 @@ static void intel_histogram_disable(struct
intel_crtc*intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +1
-0cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; + intel_crtc->config->histogram_en = false; } int intel_histogram_update(struct intel_crtc *intel_crtc, boolenable)
--
2.25.1
RE: [PATCHv2 3/5] Add crtc properties for global histogram
Quoted 27 lines
Quoted 27 lines
Quoted 27 lines
drivers/gpu/drm/i915/display/intel_crtc.c +27
-0+static int +intel_atomic_replace_property_blob_from_id (struct drm_device *dev, +struct drm_property_blob **blob, +u64 blob_id, +ssize_t expected_size, +ssize_t expected_elem_size, +bool *replaced) +{ +struct drm_property_blob *new_blob =NULL ; + +if (blob_id !=0 ) { + new_blob =drm_property_lookup_blob (dev, blob_id); +if (!new_blob) +return -EINVAL ; + +if (expected_size >0 && + new_blob->length != expected_size) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } +if (expected_elem_size >0 && + new_blob->length % expected_elem_size !=0 ) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } + } +
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc *crtc) · line 286
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_crtc.c +6
-0+ *replaced |=drm_property_replace_blob (blob, new_blob); +drm_property_blob_put (new_blob); + +return 0 ; +} +Can we align this design to what we have for get property with similar pattern of if else logic and return 0.
Done!
Quoted 52 lines
Quoted 52 lines
Quoted 42 lines
drivers/gpu/drm/i915/display/intel_crtc.c +20
-0+static int intel_crtc_set_property (struct drm_crtc *crtc, +struct drm_crtc_state *state, +struct drm_property *property, +u64 val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +bool replaced = false; + +if (property == intel_crtc->histogram_en_property) { + intel_crtc_state->histogram_en = val; + intel_crtc_state->histogram_en_changed = true; +return 0 ; + } + +if (property == intel_crtc->global_iet_property) { + intel_atomic_replace_property_blob_from_id(crtc->dev, + &intel_crtc_state-Quoted 1 line
global_iet,(quoted diff) +2
-0+ val, + sizeof(uint32_t) *
HISTOGRAM_IET_LENGTH,drivers/gpu/drm/i915/display/intel_crtc.c +7
-0+ -1, &replaced); +if (replaced) + intel_crtc_state->global_iet_changed = true; +return 0 ; + } + + drm_dbg_atomic(&i915->drm, "Unknown property[PROP:%d:%s]\n",
drivers/gpu/drm/i915/display/intel_crtc.c +4
-0+ property->base.id, property->name); +return -EINVAL ; +} +#define INTEL_CRTC_FUNCS \ .set_config = drm_atomic_helper_set_config, \ .destroy = intel_crtc_destroy, \@@ -229,7 +326,9 @@ static int intel_crtc_late_register(struct
drm_crtc
*crtc)drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc *crtc) · line 331
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_crtc.c +3
-1.set_crc_source = intel_crtc_set_crc_source, \ .verify_crc_source = intel_crtc_verify_crc_source, \ .get_crc_sources = intel_crtc_get_crc_sources, \ - .late_register = intel_crtc_late_register + .late_register = intel_crtc_late_register, \ + .atomic_set_property = intel_crtc_set_property, \ + .atomic_get_property = intel_crtc_get_property+dri-devel
Quoted 2 lines
Quoted 2 lines
Can this be made drm crtc property as histogram is generic?
If there are other drivers using this property then this can be made a drm_crtc property.
Thanks and Regards,
Arun R Murthy
--------------------
Jani Nikula
maintainerRe: [PATCHv2 3/5] Add crtc properties for global histogram
In reply to Arun R MurthyQuoted 201 lines · Arun R Murthy
CRTC properties have been added for enable/disable histogram, reading the histogram data and writing the IET data. "
HISTOGRAM_EN" is the crtc property to enable/disable the global histogram and takes a value 0/1 accordingly.
"Histogram" is a crtc property to read the binary histogram data. "Global IET" is a crtc property to write the IET binary LUT data.v2: Read the histogram blob data before sending uevent (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_atomic.c | 5 + drivers/gpu/drm/i915/display/intel_crtc.c | 202 +++++++++++++++++- drivers/gpu/drm/i915/display/intel_crtc.h | 5 + drivers/gpu/drm/i915/display/intel_display.c | 13 ++ .../drm/i915/display/intel_display_types.h | 17 ++ .../gpu/drm/i915/display/intel_histogram.c | 7 + 6 files changed, 248 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_atomic.c +5
-0@@ -246,6 +246,8 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +if (crtc_state->global_iet) +drm_property_blob_get (crtc_state->global_iet);/* copy color blobs */ if (crtc_state->hw.degamma_lut)drm_property_blob_get (crtc_state->hw.degamma_lut);@@ -277,6 +279,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; crtc_state->dsb =NULL ; + crtc_state->histogram_en_changed = false;return &crtc_state->uapi; }@@ -312,6 +315,8 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,drm_WARN_ON (crtc->dev, crtc_state->dsb); +if (crtc_state->global_iet) +drm_property_blob_put (crtc_state->global_iet);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi);intel_crtc_free_hw_state (crtc_state);if (crtc_state->dp_tunnel_ref.tunnel)drivers/gpu/drm/i915/display/intel_crtc.c +104
-1@@ -10,6 +10,7 @@#include <drm/drm_fourcc.h> #include <drm/drm_plane.h> #include <drm/drm_vblank_work.h> +#include <drm/drm_atomic_uapi.h> #include "i915_vgpu.h" #include "i9xx_plane.h" @@ -26,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" @@ -201,6 +203,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_deinit (crtc);kfree (crtc); }@@ -220,6 +223,100 @@ static int intel_crtc_late_register(struct drm_crtc *crtc)return 0 ; } +static int intel_crtc_get_property (struct drm_crtc *crtc, +const struct drm_crtc_state *state, +struct drm_property *property, +uint64_t *val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +const struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); + +if (property == intel_crtc->histogram_en_property) { + *val = intel_crtc_state->histogram_en; + }else if (property == intel_crtc->global_iet_property) { + *val = (intel_crtc_state->global_iet) ? + intel_crtc_state->global_iet->base.id :0 ; + }else if (property == intel_crtc->histogram_property) { + *val = (intel_crtc_state->histogram) ? + intel_crtc_state->histogram->base.id :0 ; + }else { +drm_err (&i915->drm, +"Unknown property [PROP:%d:%s]\n" , + property->base.id, property->name); +return -EINVAL ; + } + +return 0 ; +} + +static int +intel_atomic_replace_property_blob_from_id (struct drm_device *dev, +struct drm_property_blob **blob, +u64 blob_id, +ssize_t expected_size, +ssize_t expected_elem_size, +bool *replaced) +{ +struct drm_property_blob *new_blob =NULL ; + +if (blob_id !=0 ) { + new_blob =drm_property_lookup_blob (dev, blob_id); +if (!new_blob) +return -EINVAL ; + +if (expected_size >0 && + new_blob->length != expected_size) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } +if (expected_elem_size >0 && + new_blob->length % expected_elem_size !=0 ) { +drm_property_blob_put (new_blob); +return -EINVAL ; + } + } + + *replaced |=drm_property_replace_blob (blob, new_blob); +drm_property_blob_put (new_blob); + +return 0 ; +} + +static int intel_crtc_set_property (struct drm_crtc *crtc, +struct drm_crtc_state *state, +struct drm_property *property, +u64 val) +{ +struct drm_i915_private *i915 =to_i915 (crtc->dev); +struct intel_crtc_state *intel_crtc_state = +to_intel_crtc_state (state); +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +bool replaced = false; + +if (property == intel_crtc->histogram_en_property) { + intel_crtc_state->histogram_en = val; + intel_crtc_state->histogram_en_changed = true; +return 0 ; + } + +if (property == intel_crtc->global_iet_property) { +intel_atomic_replace_property_blob_from_id (crtc->dev, + &intel_crtc_state->global_iet, + val, +sizeof (uint32_t ) *HISTOGRAM_IET_LENGTH , +-1 , &replaced); +if (replaced) + intel_crtc_state->global_iet_changed = true; +return 0 ; + } + +drm_dbg_atomic (&i915->drm,"Unknown property [PROP:%d:%s]\n" , + property->base.id, property->name); +return -EINVAL ; +} +#define INTEL_CRTC_FUNCS \ .set_config = drm_atomic_helper_set_config, \ .destroy = intel_crtc_destroy, \@@ -229,7 +326,9 @@ static int intel_crtc_late_register(struct drm_crtc *crtc) .set_crc_source = intel_crtc_set_crc_source, \ .verify_crc_source = intel_crtc_verify_crc_source, \ .get_crc_sources = intel_crtc_get_crc_sources, \ - .late_register = intel_crtc_late_register + .late_register = intel_crtc_late_register, \ + .atomic_set_property = intel_crtc_set_property, \ + .atomic_get_property = intel_crtc_get_propertystatic const struct drm_crtc_funcs bdw_crtc_funcs = {INTEL_CRTC_FUNCS ,@@ -374,6 +473,10 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)intel_color_crtc_init (crtc);intel_drrs_crtc_init (crtc);intel_crtc_crc_init (crtc); +intel_histogram_init (crtc); + +/* Initialize crtc properties */ +intel_crtc_add_property (crtc);cpu_latency_qos_add_request (&crtc->vblank_pm_qos,PM_QOS_DEFAULT_VALUE );
drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state, · line 797
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_crtc.c +2
-0@@ -690,3 +793,100 @@ void intel_pipe_update_end(struct intel_atomic_state *state, out:intel_psr_unlock (new_crtc_state); } + +static const struct drm_prop_enum_list histogram_en_names[] = {
en_names?
drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state, · line 807
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+ { INTEL_HISTOGRAM_DISABLE, "Disable" }, + { INTEL_HISTOGRAM_ENABLE, "Enable" }, +}; + +/** +* intel_attach_histogram_en_property() - add property to enable/disable histogram +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram is to +* be enabled/disabled +* +* "HISTOGRAM_EN" is the crtc propety to enable/disable global histogram
There's zero gain in abbreviating enable to _EN.
Quoted 149 lines
drivers/gpu/drm/i915/display/intel_crtc.c +85
-0+*/ +void intel_attach_histogram_en_property (struct intel_crtc *intel_crtc) +{ +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->histogram_en_property; +if (!prop) { + prop =drm_property_create_enum (dev,0 , +"HISTOGRAM_EN" , + histogram_en_names, +ARRAY_SIZE (histogram_en_names)); +if (!prop) +return ; + + intel_crtc->histogram_en_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); +} + +/** +* intel_attach_global_iet_property() - add property to write Image Enhancement data +* @intel_crtc: pointer to the struct intel_crtc on which global histogram is enabled +* +* "Global IET" is the crtc property to write the Image Enhancement LUT binary data +*/ +void intel_attach_global_iet_property (struct intel_crtc *intel_crtc) +{ +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->global_iet_property; +if (!prop) { + prop =drm_property_create (dev,DRM_MODE_PROP_BLOB |DRM_MODE_PROP_ATOMIC , +"Global IET" ,0 ); +if (!prop) +return ; + + intel_crtc->global_iet_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); +} + +/** +* intel_attach_histogram_property() - crtc property to read the histogram. +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram +* was enabled. +* "Global Histogram" is the crtc property to read the binary histogram data. +*/ +void intel_attach_histogram_property (struct intel_crtc *intel_crtc) +{ +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; +struct drm_property_blob *blob; + + prop = intel_crtc->histogram_property; +if (!prop) { + prop =drm_property_create (dev,DRM_MODE_PROP_BLOB | +DRM_MODE_PROP_ATOMIC | +DRM_MODE_PROP_IMMUTABLE , +"Global Histogram" ,0 ); +if (!prop) +return ; + + intel_crtc->histogram_property = prop; + } + blob =drm_property_create_blob (dev,sizeof (uint32_t ) *HISTOGRAM_BIN_COUNT ,NULL ); + intel_crtc->config->histogram = blob; + +drm_object_attach_property (&crtc->base, prop, blob->base.id); +} + +int intel_crtc_add_property (struct intel_crtc *intel_crtc) +{ +intel_attach_histogram_en_property (intel_crtc); +intel_attach_histogram_property (intel_crtc); +intel_attach_global_iet_property (intel_crtc); + +return 0 ; +}drivers/gpu/drm/i915/display/intel_crtc.h +5
-0@@ -7,6 +7,7 @@#define _INTEL_CRTC_H_#include <linux/types.h> +#include <drm/drm_crtc.h> enum i9xx_plane_id ;enum pipe ;@@ -49,4 +50,8 @@ void intel_wait_for_vblank_if_active(struct drm_i915_private *i915, enum pipe pipe);void intel_crtc_wait_for_next_vblank (struct intel_crtc *crtc); +int intel_crtc_add_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_en_property (struct intel_crtc *intel_crtc); +void intel_attach_global_iet_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_property (struct intel_crtc *intel_crtc);#endif drivers/gpu/drm/i915/display/intel_display.c +13
-0@@ -94,6 +94,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" @@ -4335,6 +4336,10 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,if (ret)return ret; +/* HISTOGRAM changed */ +if (crtc_state->histogram_en_changed) +return intel_histogram_atomic_check (crtc); +return 0 ; }@@ -7512,6 +7517,14 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)* FIXME get rid of this funny new->old swapping */ old_crtc_state->dsb =fetch_and_zero (&new_crtc_state->dsb); + +/* Re-Visit: HISTOGRAM related stuff */ +if (new_crtc_state->histogram_en_changed) +intel_histogram_update (crtc, + new_crtc_state->histogram_en); +if (new_crtc_state->global_iet_changed) +intel_histogram_set_iet_lut (crtc, + (u32 *)new_crtc_state->global_iet->data); }/* Underruns don't always raise interrupts, so check manually */ drivers/gpu/drm/i915/display/intel_display_types.h +0
-0
drivers/gpu/drm/i915/display/intel_display_types.h enum intel_broadcast_rgb { · line 107
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display_types.h +6
-0@@ -99,6 +99,12 @@ enum intel_broadcast_rgb { INTEL_BROADCAST_RGB_LIMITED, }; +/* HISTOGRAM property */ +enum intel_histogram_en_prop { +INTEL_HISTOGRAM_PROP_DISABLE , +INTEL_HISTOGRAM_PROP_ENABLE , +}; +
This is not a property. This is a regular enum. And it does not belong in this file.
drivers/gpu/drm/i915/display/intel_display_types.h struct intel_crtc_state { · line 1441
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display_types.h +2
-0struct intel_fb_view {/* * The remap information used in the remapped and rotated views to @@ -1431,6 +1437,13 @@ struct intel_crtc_state {/* LOBF flag */ bool has_lobf; + +/* HISTOGRAM data */
Why all caps?
drivers/gpu/drm/i915/display/intel_display_types.h struct intel_crtc_state { · line 1446
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_types.h +5
-0+int histogram_en; +struct drm_property_blob *global_iet; +struct drm_property_blob *histogram; +bool global_iet_changed; +bool histogram_en_changed;
Please add a substruct for all the histogram stuff to keep it clean.
Quoted 39 lines
drivers/gpu/drm/i915/display/intel_display_types.h +4
-0};enum intel_pipe_crc_source {@@ -1538,6 +1551,10 @@ struct intel_crtc {struct pm_qos_request vblank_pm_qos;struct intel_histogram *histogram; +/* HISTOGRAM properties */ +struct drm_property *histogram_en_property; +struct drm_property *global_iet_property; +struct drm_property *histogram_property;#ifdef CONFIG_DEBUG_FS struct intel_pipe_crc pipe_crc;drivers/gpu/drm/i915/display/intel_histogram.c +7
-0@@ -66,6 +66,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work) i, histogram->bindata[i]); } +drm_property_replace_global_blob (&i915->drm, + &intel_crtc->config->histogram, +sizeof (histogram->bindata), + histogram->bindata, &intel_crtc->base.base, + intel_crtc->histogram_property); +/* Notify user for Histogram rediness */ if (kobject_uevent_env (&i915->drm.primary->kdev->kobj,KOBJ_CHANGE , histogram_event))@@ -193,6 +199,7 @@ static void intel_histogram_disable(struct intel_crtc *intel_crtc)cancel_delayed_work (&histogram->handle_histogram_int_work); histogram->enable = false; + intel_crtc->config->histogram_en = false; }int intel_histogram_update (struct intel_crtc *intel_crtc,bool enable)
Signature · 1 line
Jani Nikula, Intel
RE: [PATCHv2 3/5] Add crtc properties for global histogram
Quoted 28 lines
drivers/gpu/drm/i915/display/intel_crtc.c static int intel_crtc_late_register(struct drm_crtc
Quoted 4 lines
#define
INTEL_CRTC_FUNCS\drivers/gpu/drm/i915/display/intel_crtc.c +0
-0.set_config = drm_atomic_helper_set_config, \ .destroy = intel_crtc_destroy, \@@ -229,7 +326,9 @@ static int intel_crtc_late_register(struct drm_crtc*crtc)
drivers/gpu/drm/i915/display/intel_crtc.c int intel_crtc_init(struct drm_i915_private
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_crtc.c +3
-1.set_crc_source = intel_crtc_set_crc_source, \ .verify_crc_source = intel_crtc_verify_crc_source, \ .get_crc_sources = intel_crtc_get_crc_sources, \ - .late_register = intel_crtc_late_register + .late_register = intel_crtc_late_register, \ + .atomic_set_property = intel_crtc_set_property, \ + .atomic_get_property = intel_crtc_get_propertystatic const struct drm_crtc_funcs bdw_crtc_funcs = {INTEL_CRTC_FUNCS ,@@ -374,6 +473,10 @@ int intel_crtc_init(struct drm_i915_private
*dev_priv, enum pipe pipe)Quoted 11 lines
drivers/gpu/drm/i915/display/intel_crtc.c +4
-0intel_color_crtc_init (crtc);intel_drrs_crtc_init (crtc);intel_crtc_crc_init (crtc); +intel_histogram_init (crtc); + +/* Initialize crtc properties */ +intel_crtc_add_property (crtc);cpu_latency_qos_add_request (&crtc->vblank_pm_qos,PM_QOS_DEFAULT_VALUE );
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct · line 797
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_crtc.c +2
-0@@ -690,3 +793,100 @@ void intel_pipe_update_end(structintel_atomic_state *state, out:intel_psr_unlock (new_crtc_state ); } + +static const struct drm_prop_enum_list histogram_en_names[] = {
en_names?
Changed to enable_names
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state, · line 857
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_crtc.c +7
-0+ { INTEL_HISTOGRAM_DISABLE, "Disable" }, + { INTEL_HISTOGRAM_ENABLE, "Enable" }, }; + +/** +* intel_attach_histogram_en_property() - add property to +enable/disable histogram +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram is to
Quoted 7 lines
Quoted 4 lines
+ * be enabled/disabled
+ *
+ * "HISTOGRAM_EN" is the crtc propety to enable/disable global +histogramThere's zero gain in abbreviating enable to
_EN.
Changed to Enable, also removed all caps.
Quoted 158 lines
drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state, · line 823
Quoted 13 lines
+ */
drivers/gpu/drm/i915/display/intel_crtc.c +12
-0+void intel_attach_histogram_en_property (struct intel_crtc +*intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->histogram_en_property; +if (!prop) { + prop = drm_property_create_enum(dev, 0, + "HISTOGRAM_EN", + histogram_en_names, +ARRAY_SIZE(histogram_en_names));Quoted 14 lines
drivers/gpu/drm/i915/display/intel_crtc.c +14
-0+if (!prop) +return ; + + intel_crtc->histogram_en_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_global_iet_property() - add property to write Image +Enhancement data +* @intel_crtc: pointer to the struct intel_crtc on which global +histogram is enabled +* drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state, · line 870
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+* "Global IET" is the crtc property to write the Image Enhancement +LUT binary data */ void intel_attach_global_iet_property (struct +intel_crtc *intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; + + prop = intel_crtc->global_iet_property; +if (!prop) { + prop = drm_property_create(dev, DRM_MODE_PROP_BLOB |
DRM_MODE_PROP_ATOMIC,Quoted 23 lines
drivers/gpu/drm/i915/display/intel_crtc.c +23
-0+ "Global IET", 0); +if (!prop) +return ; + + intel_crtc->global_iet_property = prop; + } + +drm_object_attach_property (&crtc->base, prop,0 ); } + +/** +* intel_attach_histogram_property() - crtc property to read the histogram. +* @intel_crtc: pointer to the struct intel_crtc on which the global histogram +* was enabled. +* "Global Histogram" is the crtc property to read the binary histogram data. +*/ +void intel_attach_histogram_property (struct intel_crtc *intel_crtc) { +struct drm_crtc *crtc = &intel_crtc->base; +struct drm_device *dev = crtc->dev; +struct drm_property *prop; +struct drm_property_blob *blob; + + prop = intel_crtc->histogram_property; +if (!prop) {drivers/gpu/drm/i915/display/intel_crtc.c void intel_pipe_update_end(struct intel_atomic_state *state,
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_crtc.c +10
-0+ prop =drm_property_create (dev,DRM_MODE_PROP_BLOB | +DRM_MODE_PROP_ATOMIC | +DRM_MODE_PROP_IMMUTABLE , +"Global Histogram" ,0 ); +if (!prop) +return ; + + intel_crtc->histogram_property = prop; + } + blob = drm_property_create_blob(dev, sizeof(uint32_t) *
HISTOGRAM_BIN_COUNT, NULL);drivers/gpu/drm/i915/display/intel_crtc.h void intel_wait_for_vblank_if_active(struct
Quoted 25 lines
drivers/gpu/drm/i915/display/intel_crtc.c +11
-0+ intel_crtc->config->histogram = blob; + +drm_object_attach_property (&crtc->base, prop, blob->base.id); } + +int intel_crtc_add_property (struct intel_crtc *intel_crtc) { +intel_attach_histogram_en_property (intel_crtc); +intel_attach_histogram_property (intel_crtc); +intel_attach_global_iet_property (intel_crtc); + +return 0 ; +}drivers/gpu/drm/i915/display/intel_crtc.h +1
-0@@ -7,6 +7,7 @@#define _INTEL_CRTC_H_#include <linux/types.h> +#include <drm/drm_crtc.h> enum i9xx_plane_id ;enum pipe ;@@ -49,4 +50,8 @@ void intel_wait_for_vblank_if_active(struct
drm_i915_private*i915,drivers/gpu/drm/i915/display/intel_display.c static int intel_crtc_atomic_check(struct
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_crtc.h +4
-0enum pipe pipe);void intel_crtc_wait_for_next_vblank (struct intel_crtc *crtc); +int intel_crtc_add_property (struct intel_crtc *intel_crtc);void +intel_attach_histogram_en_property (struct intel_crtc *intel_crtc); +void intel_attach_global_iet_property (struct intel_crtc *intel_crtc); +void intel_attach_histogram_property (struct intel_crtc *intel_crtc);#endif drivers/gpu/drm/i915/display/intel_display.c +1
-0@@ -94,6 +94,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" @@ -4335,6 +4336,10 @@ static int intel_crtc_atomic_check(struct
intel_atomic_state*state,drivers/gpu/drm/i915/display/intel_display.c static void intel_atomic_commit_tail(struct
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0if (ret)return ret; +/* HISTOGRAM changed */ +if (crtc_state->histogram_en_changed) +return intel_histogram_atomic_check (crtc); +return 0 ; }@@ -7512,6 +7517,14 @@ static void intel_atomic_commit_tail(struct
intel_atomic_state*state)Quoted 24 lines
drivers/gpu/drm/i915/display/intel_display.c +8
-0* FIXME get rid of this funny new->old swapping */ old_crtc_state->dsb =fetch_and_zero (&new_crtc_state->dsb); + +/* Re-Visit: HISTOGRAM related stuff */ +if (new_crtc_state->histogram_en_changed) +intel_histogram_update (crtc, + new_crtc_state->histogram_en); +if (new_crtc_state->global_iet_changed) +intel_histogram_set_iet_lut (crtc, + (u32 *)new_crtc_state- global_iet->data); }drivers/gpu/drm/i915/display/intel_display.c +0
-0/* Underruns don't always raise interrupts, so check manually */ drivers/gpu/drm/i915/display/intel_display_types.h +0
-0@@ -99,6 +99,12 @@ enum intel_broadcast_rgb { INTEL_BROADCAST_RGB_LIMITED, };
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_display_types.h enum intel_broadcast_rgb { · line 107
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display_types.h +6
-0+/* HISTOGRAM property */ +enum intel_histogram_en_prop { +INTEL_HISTOGRAM_PROP_DISABLE , +INTEL_HISTOGRAM_PROP_ENABLE , +}; +This is not a property. This is a regular enum. And it does not belong in this file.
Sorry, this is obsolete, maybe I missed removed this. This will be removed in the next series.
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_types.h +0
-0struct intel_fb_view {/* * The remap information used in the remapped and rotated views to @@ -1431,6 +1437,13 @@ struct intel_crtc_state {
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_display_types.h struct intel_crtc_state { · line 1441
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display_types.h +2
-0/* LOBF flag */ bool has_lobf; + +/* HISTOGRAM data */ Why all caps?
Changed
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display_types.h struct intel_crtc_state { · line 1446
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display_types.h +5
-0+int histogram_en; +struct drm_property_blob *global_iet; +struct drm_property_blob *histogram; +bool global_iet_changed; +bool histogram_en_changed;Please add a substruct for all the histogram stuff to keep it clean.
Done
Thanks and Regards,
Arun R Murthy
--------------------
PATCH v2 4/5 drm/i915/histogram: histogram delay counter doesnt reset
In reply to Arun R MurthyThe delay counter for histogram does not reset and as a result the histogram bin never gets updated. Woraround would be to use save and restore histogram register.
--- drivers/gpu/drm/i915/display/intel_histogram.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_histogram.h | 1 + 2 files changed, 18 insertions(+)
drivers/gpu/drm/i915/display/intel_histogram.c +17 -0
@@ -36,6 +36,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work)u32 dpstbin;int i, try =0 ; +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,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
@@ -77,6 +82,12 @@ static void intel_histogram_handle_int_work(struct work_struct *work) histogram_event)) drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */ +intel_de_write (i915,DPST_CTL (intel_crtc->pipe),intel_de_read (i915, +DPST_CTL (intel_crtc->pipe)) |DPST_CTL_RESTORE ); +/* Enable histogram interrupt */ intel_de_rmw (i915,DPST_GUARD (intel_crtc->pipe),DPST_GUARD_HIST_INT_EN ,DPST_GUARD_HIST_INT_EN );
@@ -140,6 +151,12 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)/* Pipe Dithering should be enabled with GLOBAL_HIST */ intel_histogram_enable_dithering (i915, pipe); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */ +intel_de_write (i915,DPST_CTL (intel_crtc->pipe),intel_de_read (i915, +DPST_CTL (intel_crtc->pipe)) |DPST_CTL_RESTORE ); +/* * enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC
drivers/gpu/drm/i915/display/intel_histogram.h +1 -0
@@ -20,6 +20,7 @@ enum pipe;#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_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
RE: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 11 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 2 lines
The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Woraround would be to use save and restore histogram
Typo "Workaround"
Quoted 53 lines
register.
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_histogram.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_histogram.h | 1 + 2 files changed, 18 insertions(+)drivers/gpu/drm/i915/display/intel_histogram.c +5
-0@@ -36,6 +36,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work) u32 dpstbin;int i, try =0 ; +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); +/* * TODO: PSR to be exited while reading the Histogram data * Set
DPST_CTLBin Reg function select to TC @@ -77,6 +82,12 @@
static voidintel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +3
-0histogram_event)) drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); +/* Enable histogram interrupt */ intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +3
-0DPST_GUARD_HIST_INT_EN);@@ -140,6 +151,12 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)/* Pipe Dithering should be enabled with GLOBAL_HIST */ intel_histogram_enable_dithering (i915, pipe); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); +
Maybe put all the code in a function with required variables and one extra bool variable that determines If it is being called when interrupt is being serviced or when histogram is being enabled
wa_14014889975(.., bool enable)
if (!IS_DISPLAY_VER(i915, 12, 13)) /* I think there is a function that checks if display_ver is not it range to avoid the ! return if (enable) /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */ intel_de_write(i915, DPST_CTL(intel_crtc->pipe), intel_de_read(i915, DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); Else intel_de_rmw(i915, DPST_CTL(intel_crtc->pipe), DPST_CTL_RESTORE, 0);
Also use intel_display instead of i915
Regards,
Suraj Kandpal
Quoted 20 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-0* enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC diff --git
a/drivers/gpu/drm/i915/display/intel_histogram.hb/drivers/gpu/drm/i915/display/intel_histogram.h
indexf35ea76719d8..5e24d3c5c28b100644drivers/gpu/drm/i915/display/intel_histogram.h +1
-0@@ -20,6 +20,7 @@ enum pipe;#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_ENHANCEMENT_MODE_MASK REG_GENMASK (14 ,13 )#define
DPST_CTL_EN_MULTIPLICATIVE
REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
#defineDPST_CTL_IE_TABLE_VALUE_FORMATREG_BIT(15)
--
2.25.1
RE: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 19 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: Wednesday, September 11, 2024 4:10 PM
To: Murthy, Arun R <[email protected]>; [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: RE: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt resetQuoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 6 lines
Quoted 3 lines
The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Woraround would be to use save and restore histogram
Typo "Workaround"
Done
Quoted 57 lines
Quoted 36 lines
register.
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_histogram.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_histogram.h | 1 + 2 files changed, 18 insertions(+)drivers/gpu/drm/i915/display/intel_histogram.c +5
-0@@ -36,6 +36,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work) u32 dpstbin;int i, try =0 ; +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); +/* * TODO: PSR to be exited while reading the Histogram data * Set
DPST_CTLBin Reg function select to TC @@ -77,6 +82,12 @@
static voidintel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +3
-0histogram_event)) drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL(intel_crtc->pipe)) |
DPST_CTL_RESTORE);Quoted 17 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+/* Enable histogram interrupt */ intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +0
-0DPST_GUARD_HIST_INT_EN);@@ -140,6 +151,12 @@ static int intel_histogram_enable(struct
intel_crtc*intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +3
-0/* Pipe Dithering should be enabled with GLOBAL_HIST */ intel_histogram_enable_dithering (i915, pipe); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL(intel_crtc->pipe)) |
DPST_CTL_RESTORE);
Quoted 6 lines
Quoted 1 line
+
Maybe put all the code in a function with required variables and one extra bool variable that determines If it is being called when interrupt is being serviced or when histogram is being enabled
Have a function to just execute one write function would be much costlier.
Quoted 15 lines
wa_14014889975(.., bool enable)if (!IS_DISPLAY_VER(i915, 12, 13)) /* I think there is a function that checks if display_ver is not it range to avoid the ! return if (enable) /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */ intel_de_write(i915, DPST_CTL(intel_crtc->pipe), intel_de_read(i915, DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); Else intel_de_rmw(i915, DPST_CTL(intel_crtc->pipe), DPST_CTL_RESTORE, 0);
Quoted 2 lines
Also use
intel_displayinstead of i915
Done
Thanks and Regards,
Arun R Murthy
--------------------
RE: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
In reply to Arun R MurthyQuoted 11 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 3 lines
The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Woraround would be to use save and restore histogram register.
Lets not mention the issue in the commit message just what the patch/ WA is doing The issue is very well describe in WA no.
That's reminds me add wa no in commit message
Regards,
Suraj Kandpal
Quoted 75 lines
Signed-off-by Arun R Murthy <[email protected]>--- drivers/gpu/drm/i915/display/intel_histogram.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_histogram.h | 1 + 2 files changed, 18 insertions(+)drivers/gpu/drm/i915/display/intel_histogram.c +5
-0@@ -36,6 +36,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work) u32 dpstbin;int i, try =0 ; +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); +/* * TODO: PSR to be exited while reading the Histogram data * Set
DPST_CTLBin Reg function select to TC @@ -77,6 +82,12 @@
static voidintel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +3
-0histogram_event)) drm_err(&i915->drm, "sending HISTOGRAM event failed\n"); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); +/* Enable histogram interrupt */ intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
DPST_GUARD_HIST_INT_EN,drivers/gpu/drm/i915/display/intel_histogram.c +3
-0DPST_GUARD_HIST_INT_EN);@@ -140,6 +151,12 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)/* Pipe Dithering should be enabled with GLOBAL_HIST */ intel_histogram_enable_dithering (i915, pipe); +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +/* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe),intel_de_read(i915,
drivers/gpu/drm/i915/display/intel_histogram.c +2
-0+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE); +/* * enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC diff --git
a/drivers/gpu/drm/i915/display/intel_histogram.hb/drivers/gpu/drm/i915/display/intel_histogram.h
indexf35ea76719d8..5e24d3c5c28b100644drivers/gpu/drm/i915/display/intel_histogram.h +1
-0@@ -20,6 +20,7 @@ enum pipe;#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_ENHANCEMENT_MODE_MASK REG_GENMASK (14 ,13 )#define
DPST_CTL_EN_MULTIPLICATIVE
REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
#defineDPST_CTL_IE_TABLE_VALUE_FORMATREG_BIT(15)
--
2.25.1
RE: [PATCHv2 4/5] drm/i915/histogram: histogram delay counter doesnt reset
Quoted 8 lines
Quoted 3 lines
The delay counter for histogram does not reset and as a result the histogram bin never gets updated. Woraround would be to use save and restore histogram register.
Lets not mention the issue in the commit message just what the patch/ WA is doing The issue is very well describe in WA no.
That's reminds me add wa no in commit message
Done
Thanks and Regards,
Arun R Murthy
--------------------
PATCH v2 5/5 drm/i915/display/histogram: Histogram changes for Display LNL+
In reply to Arun R MurthyIn LNL+, histogram/IE data and index registers are added which was included in the control registers in the legacy platforms. The new registers are used for reading histogram and writing the IET LUT data.
v2: Removed duplicate code (Jani)
--- .../gpu/drm/i915/display/intel_histogram.c | 138 ++++++++++++------ .../gpu/drm/i915/display/intel_histogram.h | 25 ++++ 2 files changed, 122 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/display/intel_histogram.c +97 -41
@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; }; -static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram *histogram) { -struct intel_histogram *histogram =container_of (work, - struct intel_histogram, handle_histogram_int_work.work);struct drm_i915_private *i915 = histogram->i915;struct intel_crtc *intel_crtc = histogram->crtc; -char *histogram_event[] = {"HISTOGRAM=1" ,NULL };u32 dpstbin;int i, try =0 ; -/* Wa: 14014889975 */ -if (IS_DISPLAY_VER (i915,12 ,13 )) +retry: +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK ,DPST_HIST_BIN_INDEX (0 )); + }else {intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_RESTORE ,0 ); +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); + } -/* -* TODO: PSR to be exited while reading the Histogram data -* Set DPST_CTL Bin Reg function select to TC -* Set DPST_CTL Bin Register Index to 0 -*/ -retry: -intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 );for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { - dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); + dpstbin =intel_de_read (i915,DPST_HIST_BIN (intel_crtc->pipe));if (dpstbin &DPST_BIN_BUSY ) {/* * If DPST_BIN busy bit is set, then set the * DPST_CTL bin reg index to 0 and proceed * from beginning. */ -if (try++ >=5 ) { +if (DISPLAY_VER (i915) >=20 ) { +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK , +DPST_HIST_BIN_INDEX (0 )); + }else { +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_BIN_REG_MASK ,0 ); + } + +if (try++ ==5 ) {drm_err (&i915->drm,"Histogram block is busy, failed to read\n" ); intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),
@@ -66,10 +69,37 @@ static void intel_histogram_handle_int_work(struct work_struct *work) } goto retry; } - histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; + histogram->bindata[i] = dpstbin &DPST_HIST_BIN_DATA_MASK ;drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , i, histogram->bindata[i]); } +} + +static void intel_histogram_get_data (struct intel_histogram *histogram) +{ + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_histogram_read_data (histogram); +} + +static void intel_histogram_handle_int_work (struct work_struct *work) +{ +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; + +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); + +intel_histogram_get_data (histogram); drm_property_replace_global_blob(&i915->drm, &intel_crtc->config->histogram,
@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)* enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ -intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | -DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC ); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else +intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | +DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC );/* Re-Visit: check if wait for one vblank is required */ drm_crtc_wait_one_vblank (&intel_crtc->base);
@@ -252,24 +289,43 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc, u32 *data)* Set DPST_CTL Bin Reg function select to IE * Set DPST_CTL Bin Register Index to 0 */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , -DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); - -for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { -intel_de_rmw (i915,DPST_BIN (pipe), -DPST_BIN_DATA_MASK , data[i]); -drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_IE_INDEX (pipe), +DPST_IE_BIN_INDEX_MASK ,DPST_IE_BIN_INDEX (0 )); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_IE_BIN (pipe), +DPST_IE_BIN_DATA_MASK , +DPST_IE_BIN_DATA (data[i])); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + }else { +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL , +DPST_CTL_BIN_REG_FUNC_TC ); } - -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_ENHANCEMENT_MODE_MASK |DPST_CTL_IE_MODI_TABLE_EN , -DPST_CTL_EN_MULTIPLICATIVE |DPST_CTL_IE_MODI_TABLE_EN ); - -/* Once IE is applied, change DPST CTL to TC */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL ,DPST_CTL_BIN_REG_FUNC_TC ); -return 0 ; }
drivers/gpu/drm/i915/display/intel_histogram.h +25 -0
@@ -48,8 +48,33 @@ enum pipe;#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 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) +#define INTEL_HISTOGRAM_PIPEA 0x90000000#define INTEL_HISTOGRAM_PIPEB 0x90000002#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \
Signature · 1 line
2.25.1
RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Quoted 161 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+In LNL+, histogram/IE data and index registers are added which was included in the control registers in the legacy platforms. The new registers are used for reading histogram and writing the IET LUT data.
v2: Removed duplicate code (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_histogram.c | 138 ++++++++++++------ .../gpu/drm/i915/display/intel_histogram.h | 25 ++++ 2 files changed, 122 insertions(+), 41 deletions(-)drivers/gpu/drm/i915/display/intel_histogram.c +13
-17@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; }; -static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram +*histogram) { -struct intel_histogram *histogram =container_of (work, - struct intel_histogram, handle_histogram_int_work.work);struct drm_i915_private *i915 = histogram->i915;struct intel_crtc *intel_crtc = histogram->crtc; -char *histogram_event[] = {"HISTOGRAM=1" ,NULL };u32 dpstbin;int i, try =0 ; -/* Wa: 14014889975 */ -if (IS_DISPLAY_VER (i915,12 ,13 )) +retry: +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK ,DPST_HIST_BIN_INDEX (0 )); + }else {intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_RESTORE ,0 ); +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); + } -/* -* TODO: PSR to be exited while reading the Histogram data -* Set DPST_CTL Bin Reg function select to TC -* Set DPST_CTL Bin Register Index to 0 -*/ -retry: -intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_BIN_REG_FUNC_SEL | DPST_CTL_BIN_REG_MASK, 0);for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { - dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); + dpstbin =intel_de_read (i915,DPST_HIST_BIN (intel_crtc- >pipe));if (dpstbin &DPST_BIN_BUSY ) {/* * If DPST_BIN busy bit is set, then set the * DPST_CTL bin reg index to 0 and proceed * from beginning. */ -if (try++ >=5 ) { +if (DISPLAY_VER (i915) >=20 ) { + intel_de_rmw(i915,
DPST_HIST_INDEX(intel_crtc->pipe),drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+DPST_HIST_BIN_INDEX_MASK , + DPST_HIST_BIN_INDEX(0)); + }else { + intel_de_rmw(i915, DPST_CTL(intel_crtc-Quoted 1 line
pipe),
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+ DPST_CTL_BIN_REG_MASK, 0); + } + +if (try++ ==5 ) { drm_err(&i915->drm, "Histogram block is busy, failed toread\n");
intel_de_rmw(i915, DPST_GUARD(intel_crtc-Quoted 1 line
pipe), @@ -66,10 +69,37 @@ static void
intel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +1
-1} goto retry; } - histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; + histogram->bindata[i] = dpstbin &
DPST_HIST_BIN_DATA_MASK;drivers/gpu/drm/i915/display/intel_histogram.c +35
-6drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , i, histogram->bindata[i]); } +} + +static void intel_histogram_get_data (struct intel_histogram *histogram) +{ + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_histogram_read_data (histogram); +} + +static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; + +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); + +intel_histogram_get_data (histogram); drm_property_replace_global_blob(&i915->drm, &intel_crtc->config->histogram,@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct intel_crtc*intel_crtc) * enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ -intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | -DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC ); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_IE_HIST_EN|drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL_HIST_MODE |
DPST_CTL_IE_TABLE_VALUE_FORMAT,drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ 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 | +
Quoted 2 lines
DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC);
I checked the Spec looks like this wait_for_vblank is not present. As the step 1 itself differs here and there is no need of putting in TC mode.
Quoted 128 lines
drivers/gpu/drm/i915/display/intel_histogram.c +36
-11/* Re-Visit: check if wait for one vblank is required */ drm_crtc_wait_one_vblank (&intel_crtc->base);@@ -252,24 +289,43 @@ int intel_histogram_set_iet_lut(struct intel_crtc*intel_crtc, u32 *data) * Set DPST_CTL Bin Reg function select to IE * Set DPST_CTL Bin Register Index to 0 */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , -DPST_CTL_BIN_REG_FUNC_IE | DPST_CTL_BIN_REG_CLEAR); - -for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { -intel_de_rmw (i915,DPST_BIN (pipe), -DPST_BIN_DATA_MASK , data[i]); -drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_IE_INDEX (pipe), +DPST_IE_BIN_INDEX_MASK ,DPST_IE_BIN_INDEX (0 )); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_IE_BIN (pipe), +DPST_IE_BIN_DATA_MASK , +DPST_IE_BIN_DATA (data[i])); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + }else { +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL , +DPST_CTL_BIN_REG_FUNC_TC ); } - - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c +0
-1- DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c +0
-4- -/* Once IE is applied, change DPST CTL to TC */ - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c +0
-1-return 0 ; }drivers/gpu/drm/i915/display/intel_histogram.h +4
-0@@ -48,8 +48,33 @@ enum pipe;#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 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)
+#defineDPST_HIST_BIN_INDEX_MASKREG_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.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.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.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)
+#defineDPST_IE_BIN_DATA_MASKREG_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.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)
+
#defineINTEL_HISTOGRAM_PIPEA0x90000000
#defineINTEL_HISTOGRAM_PIPEB0x90000002
#defineINTEL_HISTOGRAM_EVENT(pipe)PIPE(pipe, \
--
2.25.1
RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Quoted 25 lines
Quoted 25 lines
(quoted diff) +0
-0@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct
intel_crtc*intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +0
-3* enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ - intel_de_rmw(i915, 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 +9
-3-DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | - DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_IE_HIST_EN|(quoted diff) +1
-0+ DPST_CTL_HIST_MODE |
DPST_CTL_IE_TABLE_VALUE_FORMAT,
Quoted 9 lines
Quoted 6 lines
(quoted diff) +1
-0+ DPST_CTL_BIN_REG_FUNC_TC |
DPST_CTL_IE_HIST_EN|(quoted diff) +2
-0+ DPST_CTL_HIST_MODE_HSV | +
DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC);I checked the Spec looks like this
wait_for_vblankis not present. As the step 1 itself differs here and there is no need of putting in TC mode.
This is required to get the histogram enable and then after enabling histogram, the guardband values are to be written.
Thanks and Regards,
Arun R Murthy
--------------------
RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
In reply to Arun R MurthyQuoted 10 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Drm/i915/histogram should suffice
Lets not use LNL+ use Display 20+
Quoted 2 lines
In LNL+, histogram/IE data and index registers are added which was included in
Same here
Quoted 24 lines
the control registers in the legacy platforms. The new registers are used for reading histogram and writing the IET LUT data.
v2: Removed duplicate code (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_histogram.c | 138 ++++++++++++------ .../gpu/drm/i915/display/intel_histogram.h | 25 ++++ 2 files changed, 122 insertions(+), 41 deletions(-)drivers/gpu/drm/i915/display/intel_histogram.c +2
-1@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; }; -static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram +*histogram) {
drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 40
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-5-struct intel_histogram *histogram =container_of (work, - struct intel_histogram, handle_histogram_int_work.work);struct drm_i915_private *i915 = histogram->i915;struct intel_crtc *intel_crtc = histogram->crtc; -char *histogram_event[] = {"HISTOGRAM=1" ,NULL };u32 dpstbin;int i, try =0 ; -/* Wa: 14014889975 */ -if (IS_DISPLAY_VER (i915,12 ,13 ))
Looks messy will be cleaner when you move WA to 1 function as mentioned in previous patch review
Quoted 59 lines
drivers/gpu/drm/i915/display/intel_histogram.c +11
-11+retry: +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK ,DPST_HIST_BIN_INDEX (0 )); + }else {intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_RESTORE ,0 ); +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); + } -/* -* TODO: PSR to be exited while reading the Histogram data -* Set DPST_CTL Bin Reg function select to TC -* Set DPST_CTL Bin Register Index to 0 -*/ -retry: -intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , 0);for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { - dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); + dpstbin =intel_de_read (i915,DPST_HIST_BIN (intel_crtc->pipe));if (dpstbin &DPST_BIN_BUSY ) {/* * If DPST_BIN busy bit is set, then set the * DPST_CTL bin reg index to 0 and proceed * from beginning. */ -if (try++ >=5 ) { +if (DISPLAY_VER (i915) >=20 ) { + intel_de_rmw(i915,
DPST_HIST_INDEX(intel_crtc->pipe),drivers/gpu/drm/i915/display/intel_histogram.c +8
-0+DPST_HIST_BIN_INDEX_MASK , + DPST_HIST_BIN_INDEX(0)); + }else { +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_BIN_REG_MASK ,0 ); + } + +if (try++ ==5 ) { drm_err(&i915->drm, "Histogram block is busy, failed toread\n");
intel_de_rmw(i915, DPST_GUARD(intel_crtc-Quoted 1 line
pipe), @@ -66,10 +69,37 @@ static void
intel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +3
-1} goto retry; } - histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; + histogram->bindata[i] = dpstbin &DPST_HIST_BIN_DATA_MASK ;drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , i, histogram->bindata[i]); } +} +
drivers/gpu/drm/i915/display/intel_histogram.c static void intel_histogram_handle_int_work(struct work_struct *work) · line 87
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +10
-0+static void intel_histogram_get_data (struct intel_histogram *histogram) +{ + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_histogram_read_data (histogram); +}
Maybe add read data and get data at the first patch will make this patch much more Cleaner and pleasing shouldn't really have any effect on build or functionality.
Quoted 159 lines
drivers/gpu/drm/i915/display/intel_histogram.c +23
-6+ +static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; + +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); + +intel_histogram_get_data (histogram); drm_property_replace_global_blob(&i915->drm, &intel_crtc->config->histogram,@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct intel_crtc*intel_crtc) * enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ -intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | -DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC ); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_IE_HIST_EN|drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL_HIST_MODE |
DPST_CTL_IE_TABLE_VALUE_FORMAT,drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL_BIN_REG_FUNC_TC |
DPST_CTL_IE_HIST_EN|drivers/gpu/drm/i915/display/intel_histogram.c +38
-11+DPST_CTL_HIST_MODE_HSV | + DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC);/* Re-Visit: check if wait for one vblank is required */ drm_crtc_wait_one_vblank (&intel_crtc->base);@@ -252,24 +289,43 @@ int intel_histogram_set_iet_lut(struct intel_crtc*intel_crtc, u32 *data) * Set DPST_CTL Bin Reg function select to IE * Set DPST_CTL Bin Register Index to 0 */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , -DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); - -for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { -intel_de_rmw (i915,DPST_BIN (pipe), -DPST_BIN_DATA_MASK , data[i]); -drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_IE_INDEX (pipe), +DPST_IE_BIN_INDEX_MASK ,DPST_IE_BIN_INDEX (0 )); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_IE_BIN (pipe), +DPST_IE_BIN_DATA_MASK , +DPST_IE_BIN_DATA (data[i])); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + }else { +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL , +DPST_CTL_BIN_REG_FUNC_TC ); } - - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c +0
-1- DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c +0
-4- -/* Once IE is applied, change DPST CTL to TC */ - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c +0
-1-return 0 ; }drivers/gpu/drm/i915/display/intel_histogram.h +6
-0@@ -48,8 +48,33 @@ enum pipe;#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 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.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.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.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)
+#defineDPST_IE_BIN_DATA_MASKREG_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.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)
+#defineDPST_IE_BIN_INDEX_MASK
Quoted 4 lines
REG_GENMASK(6, 0)+#define
DPST_IE_BIN_INDEX(val)
REG_FIELD_PREP(DPST_IE_BIN_INDEX_MASK, val)
+
One more reason registers should have its own file
Regards,
Suraj Kandpal
Quoted 5 lines
#define
INTEL_HISTOGRAM_PIPEA0x90000000
#defineINTEL_HISTOGRAM_PIPEB0x90000002
#defineINTEL_HISTOGRAM_EVENT(pipe)PIPE(pipe, \
--
2.25.1
RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Quoted 21 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: Wednesday, September 11, 2024 4:20 PM
To: Murthy, Arun R <[email protected]>; [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+Quoted 8 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Arun R Murthy
Sent: Wednesday, August 21, 2024 3:54 PM
To: [email protected]
Cc: Murthy, Arun R <[email protected]>
Subject: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Quoted 3 lines
Drm/i915/histogram should suffice
Lets not use LNL+ use Display 20+
Done
Quoted 5 lines
Quoted 3 lines
In LNL+, histogram/IE data and index registers are added which was included in
Same here
Done
Quoted 108 lines
Quoted 25 lines
the control registers in the legacy platforms. The new registers are used for reading histogram and writing the IET LUT data.
v2: Removed duplicate code (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_histogram.c | 138 ++++++++++++------ .../gpu/drm/i915/display/intel_histogram.h | 25 ++++ 2 files changed, 122 insertions(+), 41 deletions(-)drivers/gpu/drm/i915/display/intel_histogram.c +2
-1@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; }; -static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram +*histogram) {drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 40
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-5-struct intel_histogram *histogram =container_of (work, - struct intel_histogram, handle_histogram_int_work.work);struct drm_i915_private *i915 = histogram->i915;struct intel_crtc *intel_crtc = histogram->crtc; -char *histogram_event[] = {"HISTOGRAM=1" ,NULL };u32 dpstbin;int i, try =0 ; -/* Wa: 14014889975 */ -if (IS_DISPLAY_VER (i915,12 ,13 ))Looks messy will be cleaner when you move WA to 1 function as mentioned in previous patch review
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c +7
-1+retry: +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK ,DPST_HIST_BIN_INDEX (0 )); + }else {intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_RESTORE ,0 ); +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 );drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram {
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-8+ } -/* -* TODO: PSR to be exited while reading the Histogram data -* Set DPST_CTL Bin Reg function select to TC -* Set DPST_CTL Bin Register Index to 0 -*/ -retry: - intel_de_rmw(i915, DPST_CTL(intel_crtc->pipe), - DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_BIN_REG_MASK,Quoted 20 lines
drivers/gpu/drm/i915/display/intel_histogram.c +3
-20);for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { - dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); + dpstbin =intel_de_read (i915,DPST_HIST_BIN (intel_crtc- pipe));if (dpstbin &DPST_BIN_BUSY ) {/* * If DPST_BIN busy bit is set, then set the * DPST_CTL bin reg index to 0 and proceed * from beginning. */ -if (try++ >=5 ) { +if (DISPLAY_VER (i915) >=20 ) { + intel_de_rmw(i915,
DPST_HIST_INDEX(intel_crtc->pipe),drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+DPST_HIST_BIN_INDEX_MASK , + DPST_HIST_BIN_INDEX(0)); + }else { + intel_de_rmw(i915, DPST_CTL(intel_crtc-pipe),
drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram {
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+ DPST_CTL_BIN_REG_MASK, 0); + } + +if (try++ ==5 ) { drm_err(&i915->drm, "Histogram block is busy, failed toread\n");
drivers/gpu/drm/i915/display/intel_histogram.c static void intel_histogram_handle_int_work(struct work_struct *work)
Quoted 8 lines
intel_de_rmw(i915, DPST_GUARD(intel_crtc-
Quoted 1 line
pipe), @@ -66,10 +69,37 @@ static void
intel_histogram_handle_int_work(struct work_struct *work)drivers/gpu/drm/i915/display/intel_histogram.c +1
-1} goto retry; } - histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; + histogram->bindata[i] = dpstbin &
DPST_HIST_BIN_DATA_MASK;Quoted 11 lines
drivers/gpu/drm/i915/display/intel_histogram.c +8
-0drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , i, histogram->bindata[i]); } +} + +static void intel_histogram_get_data (struct intel_histogram +*histogram) { + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c static void intel_histogram_handle_int_work(struct work_struct *work) · line 87
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-0+* Set DPST_CTL Bin Register Index to 0 +*/ +intel_histogram_read_data (histogram); +}Maybe add read data and get data at the first patch will make this patch much more Cleaner and pleasing shouldn't really have any effect on build or functionality.
Done
Quoted 165 lines
Quoted 44 lines
drivers/gpu/drm/i915/display/intel_histogram.c +14
-0+ +static void intel_histogram_handle_int_work (struct work_struct *work) { +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; + +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); + +intel_histogram_get_data (histogram); drm_property_replace_global_blob(&i915->drm, &intel_crtc->config->histogram,@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct
intel_crtc*intel_crtc)drivers/gpu/drm/i915/display/intel_histogram.c +0
-3* enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ - intel_de_rmw(i915, 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 +9
-3-DPST_CTL_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | - DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else + intel_de_rmw(i915, DPST_CTL(pipe), + DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_IE_HIST_EN|drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL_HIST_MODE |
DPST_CTL_IE_TABLE_VALUE_FORMAT,drivers/gpu/drm/i915/display/intel_histogram.c +1
-0+ DPST_CTL_BIN_REG_FUNC_TC |
DPST_CTL_IE_HIST_EN|drivers/gpu/drm/i915/display/intel_histogram.c
Quoted 2 lines
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 int intel_histogram_set_iet_lut(struct · line 257
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-2/* Re-Visit: check if wait for one vblank is required */ drm_crtc_wait_one_vblank (&intel_crtc->base);@@ -252,24 +289,43 @@ int intel_histogram_set_iet_lut(structintel_crtc *intel_crtc, u32 *data) * Set DPST_CTL Bin Reg function select to IE * Set DPST_CTL Bin Register Index to 0 */ - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_BIN_REG_FUNC_SEL |
DPST_CTL_BIN_REG_MASK,drivers/gpu/drm/i915/display/intel_histogram.c int intel_histogram_set_iet_lut(struct · line 258
Quoted 1 line
drivers/gpu/drm/i915/display/intel_histogram.c +0
-1- DPST_CTL_BIN_REG_FUNC_IE |
DPST_CTL_BIN_REG_CLEAR);drivers/gpu/drm/i915/display/intel_histogram.c int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc, u32 *data)
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c +4
-5- -for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { -intel_de_rmw (i915,DPST_BIN (pipe), -DPST_BIN_DATA_MASK , data[i]); -drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ + intel_de_rmw(i915, DPST_IE_INDEX(pipe), + DPST_IE_BIN_INDEX_MASK,
DPST_IE_BIN_INDEX(0));Quoted 56 lines
drivers/gpu/drm/i915/display/intel_histogram.c +32
-3+for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_IE_BIN (pipe), +DPST_IE_BIN_DATA_MASK , +DPST_IE_BIN_DATA (data[i])); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + }else { +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL , +DPST_CTL_BIN_REG_FUNC_TC ); } - - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_ENHANCEMENT_MODE_MASK |
DPST_CTL_IE_MODI_TABLE_EN,drivers/gpu/drm/i915/display/intel_histogram.c +0
-1- DPST_CTL_EN_MULTIPLICATIVE |
DPST_CTL_IE_MODI_TABLE_EN);drivers/gpu/drm/i915/display/intel_histogram.c +0
-4- -/* Once IE is applied, change DPST CTL to TC */ - intel_de_rmw(i915, DPST_CTL(pipe), - DPST_CTL_BIN_REG_FUNC_SEL,
DPST_CTL_BIN_REG_FUNC_TC);drivers/gpu/drm/i915/display/intel_histogram.c +0
-1-return 0 ; }drivers/gpu/drm/i915/display/intel_histogram.h +0
-0drivers/gpu/drm/i915/display/intel_histogram.h enum pipe; · line 49
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.h +0
-0@@ -48,8 +48,33 @@ enum pipe;#define _DPST_BIN_B 0x491C4#define DPST_BIN (pipe)_MMIO_PIPE(pipe,
drivers/gpu/drm/i915/display/intel_histogram.h enum pipe; · line 51
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_histogram.h +0
-0_DPST_BIN_A, _DPST_BIN_B)#define DPST_BIN_DATA_MASK REG_GENMASK(23, 0)drivers/gpu/drm/i915/display/intel_histogram.h enum pipe; · line 60
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.h +5
-0+#define DPST_BIN_DATA 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)Quoted 23 lines
drivers/gpu/drm/i915/display/intel_histogram.h +1
-0+#define DPST_HIST_BIN_INDEX (val)
REG_FIELD_PREP(DPST_HIST_BIN_INDEX_MASK, val)drivers/gpu/drm/i915/display/intel_histogram.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.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.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)
+#defineDPST_IE_BIN_DATA_MASKREG_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.h +4
-0+ +#define _DPST_IE_INDEX_A 0x490DC +#define _DPST_IE_INDEX_B 0x491DC +#define DPST_IE_INDEX (pipe) _MMIO_PIPE(pipe,
Quoted 9 lines
Quoted 6 lines
_DPST_IE_INDEX_A,_DPST_IE_INDEX_B)
+#defineDPST_IE_BIN_INDEX_MASKREG_GENMASK(6, 0)+#define
DPST_IE_BIN_INDEX(val)
REG_FIELD_PREP(DPST_IE_BIN_INDEX_MASK, val)
+One more reason registers should have its own file
Done
Thanks and Regards,
Arun R Murthy
--------------------
Jani Nikula
maintainerRe: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
In reply to Arun R MurthyQuoted 17 lines · Arun R Murthy
In LNL+, histogram/IE data and index registers are added which was included in the control registers in the legacy platforms. The new registers are used for reading histogram and writing the IET LUT data.
v2: Removed duplicate code (Jani)
Signed-off-by Arun R Murthy <[email protected]>--- .../gpu/drm/i915/display/intel_histogram.c | 138 ++++++++++++------ .../gpu/drm/i915/display/intel_histogram.h | 25 ++++ 2 files changed, 122 insertions(+), 41 deletions(-)drivers/gpu/drm/i915/display/intel_histogram.c +0
-0
drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 29
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_histogram.c +1
-1@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; }; -static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram *histogram)
Please refactor the stuff in patches 1-4 so the LNL changes just drop in cleanly, so we don't have to refactor stuff here anymore.
Quoted 217 lines
drivers/gpu/drm/i915/display/intel_histogram.c +96
-40{ -struct intel_histogram *histogram =container_of (work, - struct intel_histogram, handle_histogram_int_work.work);struct drm_i915_private *i915 = histogram->i915;struct intel_crtc *intel_crtc = histogram->crtc; -char *histogram_event[] = {"HISTOGRAM=1" ,NULL };u32 dpstbin;int i, try =0 ; -/* Wa: 14014889975 */ -if (IS_DISPLAY_VER (i915,12 ,13 )) +retry: +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK ,DPST_HIST_BIN_INDEX (0 )); + }else {intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_RESTORE ,0 ); +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 ); + } -/* -* TODO: PSR to be exited while reading the Histogram data -* Set DPST_CTL Bin Reg function select to TC -* Set DPST_CTL Bin Register Index to 0 -*/ -retry: -intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK ,0 );for (i =0 ; i <HISTOGRAM_BIN_COUNT ; i++) { - dpstbin =intel_de_read (i915,DPST_BIN (intel_crtc->pipe)); + dpstbin =intel_de_read (i915,DPST_HIST_BIN (intel_crtc->pipe));if (dpstbin &DPST_BIN_BUSY ) {/* * If DPST_BIN busy bit is set, then set the * DPST_CTL bin reg index to 0 and proceed * from beginning. */ -if (try++ >=5 ) { +if (DISPLAY_VER (i915) >=20 ) { +intel_de_rmw (i915,DPST_HIST_INDEX (intel_crtc->pipe), +DPST_HIST_BIN_INDEX_MASK , +DPST_HIST_BIN_INDEX (0 )); + }else { +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_BIN_REG_MASK ,0 ); + } + +if (try++ ==5 ) {drm_err (&i915->drm,"Histogram block is busy, failed to read\n" ); intel_de_rmw(i915, DPST_GUARD(intel_crtc->pipe),@@ -66,10 +69,37 @@ static void intel_histogram_handle_int_work(struct work_struct *work) } goto retry; } - histogram->bindata[i] = dpstbin &DPST_BIN_DATA_MASK ; + histogram->bindata[i] = dpstbin &DPST_HIST_BIN_DATA_MASK ;drm_dbg_atomic (&i915->drm,"Histogram[%d]=%x\n" , i, histogram->bindata[i]); } +} + +static void intel_histogram_get_data (struct intel_histogram *histogram) +{ + +/* +* TODO: PSR to be exited while reading the Histogram data +* Set DPST_CTL Bin Reg function select to TC +* Set DPST_CTL Bin Register Index to 0 +*/ +intel_histogram_read_data (histogram); +} + +static void intel_histogram_handle_int_work (struct work_struct *work) +{ +struct intel_histogram *histogram =container_of (work, + struct intel_histogram, handle_histogram_int_work.work); +struct drm_i915_private *i915 = histogram->i915; +struct intel_crtc *intel_crtc = histogram->crtc; +char *histogram_event[] = {"HISTOGRAM=1" ,NULL }; + +/* Wa: 14014889975 */ +if (IS_DISPLAY_VER (i915,12 ,13 )) +intel_de_rmw (i915,DPST_CTL (intel_crtc->pipe), +DPST_CTL_RESTORE ,0 ); + +intel_histogram_get_data (histogram); drm_property_replace_global_blob(&i915->drm, &intel_crtc->config->histogram,@@ -161,12 +191,19 @@ static int intel_histogram_enable(struct intel_crtc *intel_crtc)* enable DPST_CTL Histogram mode * Clear DPST_CTL Bin Reg function select to TC */ -intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | -DPST_CTL_HIST_MODE_HSV | -DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC ); +if (DISPLAY_VER (i915) >=20 ) +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE , +DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV ); +else +intel_de_rmw (i915,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_BIN_REG_FUNC_TC |DPST_CTL_IE_HIST_EN | +DPST_CTL_HIST_MODE_HSV | +DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC );/* Re-Visit: check if wait for one vblank is required */ drm_crtc_wait_one_vblank (&intel_crtc->base);@@ -252,24 +289,43 @@ int intel_histogram_set_iet_lut(struct intel_crtc *intel_crtc, u32 *data)* Set DPST_CTL Bin Reg function select to IE * Set DPST_CTL Bin Register Index to 0 */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , -DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); - -for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { -intel_de_rmw (i915,DPST_BIN (pipe), -DPST_BIN_DATA_MASK , data[i]); -drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , i, data[i]); +if (DISPLAY_VER (i915) >=20 ) { +/* Set index to zero */ +intel_de_rmw (i915,DPST_IE_INDEX (pipe), +DPST_IE_BIN_INDEX_MASK ,DPST_IE_BIN_INDEX (0 )); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_IE_BIN (pipe), +DPST_IE_BIN_DATA_MASK , +DPST_IE_BIN_DATA (data[i])); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + }else { +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL |DPST_CTL_BIN_REG_MASK , +DPST_CTL_BIN_REG_FUNC_IE |DPST_CTL_BIN_REG_CLEAR ); +for (i =0 ; i <HISTOGRAM_IET_LENGTH ; i++) { +intel_de_rmw (i915,DPST_BIN (pipe), +DPST_BIN_DATA_MASK , data[i]); +drm_dbg_atomic (&i915->drm,"iet_lut[%d]=%x\n" , + i, data[i]); + } +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_ENHANCEMENT_MODE_MASK | +DPST_CTL_IE_MODI_TABLE_EN , +DPST_CTL_EN_MULTIPLICATIVE | +DPST_CTL_IE_MODI_TABLE_EN ); + +/* Once IE is applied, change DPST CTL to TC */ +intel_de_rmw (i915,DPST_CTL (pipe), +DPST_CTL_BIN_REG_FUNC_SEL , +DPST_CTL_BIN_REG_FUNC_TC ); } - -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_ENHANCEMENT_MODE_MASK |DPST_CTL_IE_MODI_TABLE_EN , -DPST_CTL_EN_MULTIPLICATIVE |DPST_CTL_IE_MODI_TABLE_EN ); - -/* Once IE is applied, change DPST CTL to TC */ -intel_de_rmw (i915,DPST_CTL (pipe), -DPST_CTL_BIN_REG_FUNC_SEL ,DPST_CTL_BIN_REG_FUNC_TC ); -return 0 ; }drivers/gpu/drm/i915/display/intel_histogram.h +25
-0@@ -48,8 +48,33 @@ enum pipe;#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 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) +#define INTEL_HISTOGRAM_PIPEA 0x90000000#define INTEL_HISTOGRAM_PIPEB 0x90000002#define INTEL_HISTOGRAM_EVENT (pipe) PIPE(pipe, \
Signature · 1 line
Jani Nikula, Intel
RE: [PATCHv2 5/5] drm/i915/display/histogram: Histogram changes for Display LNL+
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_histogram.c +0
-0@@ -26,38 +26,41 @@ struct intel_histogram {u32 bindata[HISTOGRAM_BIN_COUNT ]; };
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_histogram.c struct intel_histogram { · line 30
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_histogram.c +2
-1-static void intel_histogram_handle_int_work (struct work_struct *work) +static void intel_histogram_read_data (struct intel_histogram +*histogram)Please refactor the stuff in patches 1-4 so the LNL changes just drop in cleanly, so we don't have to refactor stuff here anymore.
Done
Thanks and Regards,
Arun R Murthy
--------------------
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Display Global Histogram (rev2)
In reply to Arun R Murthy== Series Details ==
== Series Details ==
Series: Display Global Histogram (rev2)
URL : https://patchwork.freedesktop.org/series/135793/
State : warning
== Summary ==
Error: dim checkpatch failed337a25d5ced9 drm/i915/display: Add support for histogram
-:43: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #43:
new file mode 100644
-:103: WARNING:BRACES: braces {} are not necessary for single statement blocks #103: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:56:
+ if (!histogram->can_enable) {
+ return -EINVAL;
+ }
-:241: WARNING:BRACES: braces {} are not necessary for single statement blocks #241: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:194:
+ if (!histogram) {
+ return -ENOMEM;
+ }
-:259: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/intel_histogram.h', please use '/*' instead #259: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:1:
+// SPDX-License-Identifier: MIT
-:259: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #259: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:1:
+// SPDX-License-Identifier: MIT
-:280: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #280: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:22:
+#define DPST_CTL_EN_MULTIPLICATIVE REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
-:287: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #287: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:29:
+#define DPST_CTL_IE_TABLE_VALUE_FORMAT_2INT_8FRAC REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 1)
-:288: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #288: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:30:
+#define DPST_CTL_IE_TABLE_VALUE_FORMAT_1INT_9FRAC REG_FIELD_PREP(DPST_CTL_IE_TABLE_VALUE_FORMAT, 0)
-:294: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #294: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:36:
+#define DPST_GUARD(pipe) _MMIO_PIPE(pipe, _DPST_GUARD_A, _DPST_GUARD_B)
-:298: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #298: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:40:
+#define DPST_GUARD_INTERRUPT_DELAY(val) REG_FIELD_PREP(DPST_GUARD_INTERRUPT_DELAY_MASK, val)
-:300: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #300: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:42:
+#define DPST_GUARD_THRESHOLD_GB(val) REG_FIELD_PREP(DPST_GUARD_THRESHOLD_GB_MASK, val)
total: 0 errors, 11 warnings, 0 checks, 305 lines checked b98928743342 drm/i915/display: histogram interrupt handling
-:6: WARNING:TYPO_SPELLING: 'trigerred' may be misspelled - perhaps 'triggered'? #6:
Upon enabling histogram an interrupt is trigerred after the generation
^^^^^^^^^
-:68: WARNING:STATIC_CONST_CHAR_ARRAY: char * array declaration might be better as static const #68: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:35:
+ char *histogram_event[] = {"HISTOGRAM=1", NULL};
total: 0 errors, 2 warnings, 0 checks, 173 lines checked 72761d7c3212 Add crtc properties for global histogram
-:409: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #409: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:70:
+ drm_property_replace_global_blob(&i915->drm,
+ &intel_crtc->config->histogram,
total: 0 errors, 0 warnings, 1 checks, 364 lines checked a1efcc4da642 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
^^^^^^
-:34: WARNING:LONG_LINE_COMMENT: line length of 103 exceeds 100 columns #34: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:87:
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
-:36: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #36: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:89:
+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe), intel_de_read(i915,
+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE);
-:47: WARNING:LONG_LINE_COMMENT: line length of 103 exceeds 100 columns #47: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:156:
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #49: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:158:
+ intel_de_write(i915, DPST_CTL(intel_crtc->pipe), intel_de_read(i915,
+ DPST_CTL(intel_crtc->pipe)) | DPST_CTL_RESTORE);
total: 0 errors, 3 warnings, 2 checks, 42 lines checked 03d4b005d1c2 drm/i915/display/histogram: Histogram changes for Display LNL+ -:91: CHECK:BRACES: Blank lines aren't necessary after an open brace '{' #91: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:80:
+{
+
-:106: WARNING:STATIC_CONST_CHAR_ARRAY: char * array declaration might be better as static const #106: FILE: drivers/gpu/drm/i915/display/intel_histogram.c:95:
+ char *histogram_event[] = {"HISTOGRAM=1", NULL};
-:217: WARNING:LONG_LINE: line length of 112 exceeds 100 columns #217: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:56:
+#define DPST_HIST_INDEX(pipe) _MMIO_PIPE(pipe, _DPST_HIST_INDEX_A, _DPST_HIST_INDEX_B)
-:219: WARNING:LONG_LINE: line length of 101 exceeds 100 columns #219: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:58:
+#define DPST_HIST_BIN_INDEX(val) REG_FIELD_PREP(DPST_HIST_BIN_INDEX_MASK, val)
-:223: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #223: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:62:
+#define DPST_HIST_BIN(pipe) _MMIO_PIPE(pipe, _DPST_HIST_BIN_A, _DPST_HIST_BIN_B)
-:229: WARNING:LONG_LINE: line length of 104 exceeds 100 columns #229: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:68:
+#define DPST_IE_BIN(pipe) _MMIO_PIPE(pipe, _DPST_IE_BIN_A, _DPST_IE_BIN_B)
-:235: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #235: FILE: drivers/gpu/drm/i915/display/intel_histogram.h:74:
+#define DPST_IE_INDEX(pipe) _MMIO_PIPE(pipe, _DPST_IE_INDEX_A, _DPST_IE_INDEX_B)
total: 0 errors, 6 warnings, 1 checks, 214 lines checked
Patchwork
CI✗ Fi.CI.SPARSE: warning for Display Global Histogram (rev2)
In reply to Arun R Murthy== Series Details ==
== Series Details ==
Series: Display Global Histogram (rev2)
URL : https://patchwork.freedesktop.org/series/135793/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
-+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced sym