> -----Original Message----- > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Sent: Tuesday, September 29, 2020 9:49 PM > To: Shankar, Uma <uma.shankar@xxxxxxxxx> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Anand, Vipin <vipin.anand@xxxxxxxxx> > Subject: Re: [v6 05/11] drm/i915/display: Enable HDR for Parade based lspcon > > On Tue, Sep 15, 2020 at 02:30:41AM +0530, Uma Shankar wrote: > > Enable HDR for LSPCON based on Parade along with MCA. > > > > Signed-off-by: Uma Shankar <uma.shankar@xxxxxxxxx> > > Signed-off-by: Vipin Anand <vipin.anand@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/display/intel_lspcon.c | 19 ++++++++----------- > > 1 file changed, 8 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c > > b/drivers/gpu/drm/i915/display/intel_lspcon.c > > index b0ca494f1110..60863b825cc5 100644 > > --- a/drivers/gpu/drm/i915/display/intel_lspcon.c > > +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c > > @@ -36,6 +36,7 @@ > > #define LSPCON_VENDOR_MCA_OUI 0x0060AD > > > > #define DPCD_MCA_LSPCON_HDR_STATUS 0x70003 > > +#define DPCD_PARADE_LSPCON_HDR_STATUS 0x00511 > > > > /* AUX addresses to write MCA AVI IF */ #define > > LSPCON_MCA_AVI_IF_WRITE_OFFSET 0x5C0 @@ -112,16 +113,20 @@ static > void > > lspcon_detect_hdr_capability(struct intel_lspcon *lspcon) > > container_of(lspcon, struct intel_digital_port, lspcon); > > struct drm_device *dev = intel_dig_port->base.base.dev; > > struct intel_dp *dp = lspcon_to_intel_dp(lspcon); > > + u32 lspcon_hdr_status_reg; > > u8 hdr_caps; > > int ret; > > > > - /* Enable HDR for MCA based LSPCON devices */ > > if (lspcon->vendor == LSPCON_VENDOR_MCA) > > - ret = drm_dp_dpcd_read(&dp->aux, > DPCD_MCA_LSPCON_HDR_STATUS, > > - &hdr_caps, 1); > > + lspcon_hdr_status_reg = DPCD_MCA_LSPCON_HDR_STATUS; > > + else if (lspcon->vendor == LSPCON_VENDOR_PARADE) > > + lspcon_hdr_status_reg = DPCD_PARADE_LSPCON_HDR_STATUS; > > else > > return; > > That could be small helper function. Ok, will add the same. > > > > + ret = drm_dp_dpcd_read(&dp->aux, lspcon_hdr_status_reg, > > + &hdr_caps, 1); > > + > > if (ret < 0) { > > drm_dbg_kms(dev, "hdr capability detection failed\n"); > > lspcon->hdr_supported = false; > > @@ -465,14 +470,6 @@ void lspcon_write_infoframe(struct intel_encoder > *encoder, > > struct intel_dp *intel_dp = enc_to_intel_dp(encoder); > > struct intel_lspcon *lspcon = enc_to_intel_lspcon(encoder); > > > > - /* > > - * Supporting HDR on MCA LSPCON > > - * Todo: Add support for Parade later > > - */ > > - if (type == HDMI_PACKET_TYPE_GAMUT_METADATA && > > - lspcon->vendor != LSPCON_VENDOR_MCA) > > - return; > > - > > switch (type) { > > case HDMI_INFOFRAME_TYPE_AVI: > > if (lspcon->vendor == LSPCON_VENDOR_MCA) > > -- > > 2.26.2 > > -- > Ville Syrjälä > Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx