EDITME: Imported from [email protected] Please review before sending.
Display histogram is a hardware functionality where a statistics for 'n' 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. User can use this histogram and apply various equilization techniques to enhance the image or use this histogram for shaders. Display ImageEnhancemenT is a hardware that interpolates the LUT value to generate the enhanced output image. 1DLUT value is to be provided by the user via crtc property. One such library Global Histogram Enhancement(GHE) will take the histogram as input and apply the algorithm to enhance the density and then return the enhanced LUT factor. This library can be located @ https://github.com/intel/ghe The corresponding mutter changes to enable/disable histogram, read the histogram data, communicate with the library and write the enhanced data back to the KMD is also pushed for review at https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3873 and https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3873/diffs?commit_id=270808ca7c8be48513553d95b4a47541f5d40206 The IGT changes for validating the histogram event and reading the histogram is also pushed for review at https://patchwork.freedesktop.org/series/135789/ and the series is pushed to get the inital feel of the histogram/IET LUT usage as well as to get started with the review. NOTE: i915 driver changes for histogram and IET LUT is not fully tested --- Arun R Murthy (20): DO_NOT_REVIEW: plane/crtc color pipeline drm: Define histogram structures exposed to user drm: Add new element histogram for colorop drm/colorop: Export function to create pipeline element histogram drm: Define ImageEnhancemenT LUT structures exposed to user drm: Add new element Image EnhancemenT for colorop drm/colorop: Export function to create pipeline element iet lut drm/i915/histogram: Define registers for histogram drm/i915/histogram: Add support for histogram drm/xe: Add histogram support to Xe builds drm/i915/histogram: histogram interrupt handling [DO_NOT_RTEVIEW] Plane Color Pipeline support for Intel platforms drm/i915/colorop: Add crtc color pipeline for i915 drm/i915/histogram: Hook i915 histogram with drm histogram drm/i915/iet: Add support to writing the IET LUT data drm/i915/colorop: create IET LUT properties drm/i915/crtc: Hook i915 IET LUT with the drm IET properties drm/i915/histogram: histogram delay counter doesn't reset drm/i915/histogram: Histogram changes for Display 20+ drm/i915/histogram: Enable pipe dithering drivers/gpu/drm/Makefile | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 6 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 2 +- drivers/gpu/drm/drm_atomic.c | 3 + drivers/gpu/drm/drm_atomic_uapi.c | 103 +++++- drivers/gpu/drm/drm_colorop.c | 181 ++++++++- drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_crtc.c | 77 ++++ drivers/gpu/drm/drm_crtc_internal.h | 6 + drivers/gpu/drm/drm_ioctl.c | 12 + drivers/gpu/drm/drm_mode_object.c | 16 + drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/display/intel_crtc.c | 7 + drivers/gpu/drm/i915/display/intel_display.c | 18 + drivers/gpu/drm/i915/display/intel_display_irq.c | 6 +- .../gpu/drm/i915/display/intel_display_limits.h | 15 + drivers/gpu/drm/i915/display/intel_display_regs.h | 5 +- drivers/gpu/drm/i915/display/intel_display_types.h | 7 + drivers/gpu/drm/i915/display/intel_histogram.c | 406 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_histogram.h | 53 +++ .../gpu/drm/i915/display/intel_histogram_regs.h | 73 ++++ drivers/gpu/drm/xe/Makefile | 3 + include/drm/drm_atomic.h | 20 + include/drm/drm_atomic_uapi.h | 2 + include/drm/drm_colorop.h | 76 ++++ include/drm/drm_crtc.h | 27 ++ include/drm/drm_drv.h | 6 + include/drm/drm_file.h | 21 +- include/uapi/drm/drm.h | 44 +++ include/uapi/drm/drm_mode.h | 153 ++++++++ 30 files changed, 1324 insertions(+), 30 deletions(-) --- base-commit: db56e7764a202da6c1f9583e9b9cc0365a973d7a change-id: 20241218-dpst-c8ecf18062bb Best regards, -- Arun R Murthy <[email protected]>
