[PATCHv2 1/5] drm/i915/display: Add support for histogram

Murthy, Arun R arun.r.murthy at intel.com
Sun Sep 15 12:47:02 UTC 2024


> > > > +#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;
> > > > +}
> > > > +
> > > 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+
> 
> 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.
> 
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
--------------------


More information about the Intel-gfx mailing list