* [PATCH v5 1/2] drm: Add connector property to limit max bpc @ 2018-09-05 20:11 Radhakrishna Sripada 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Radhakrishna Sripada @ 2018-09-05 20:11 UTC (permalink / raw) To: intel-gfx; +Cc: Kishore Kadiyala, dri-devel, Rodrigo Vivi At times 12bpc HDMI cannot be driven due to faulty cables, dongles level shifters etc. To workaround them we may need to drive the output at a lower bpc. Currently the user space does not have a way to limit the bpc. The default bpc to be programmed is decided by the driver and is run against connector limitations. Creating a new connector property "max bpc" in order to limit the bpc. xrandr can make use of this connector property to make sure that bpc does not exceed the configured value. This property can be used by userspace to set the bpc. V2: Initialize max_bpc to satisfy kms_properties V3: Move the property to drm_connector V4: Split drm and i915 components(Ville) V5: Make the property per connector(Ville) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Kishore Kadiyala <kishore.kadiyala@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> --- drivers/gpu/drm/drm_atomic.c | 4 ++++ drivers/gpu/drm/drm_atomic_helper.c | 4 ++++ include/drm/drm_connector.h | 12 ++++++++++++ 3 files changed, 20 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index d0478abc01bd..6c6f8d5b5214 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1420,6 +1420,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, return set_out_fence_for_connector(state->state, connector, fence_ptr); + } else if (property == connector->max_bpc_property) { + state->max_bpc = val; } else if (connector->funcs->atomic_set_property) { return connector->funcs->atomic_set_property(connector, state, property, val); @@ -1515,6 +1517,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector, *val = 0; } else if (property == config->writeback_out_fence_ptr_property) { *val = 0; + } else if (property == connector->max_bpc_property) { + *val = state->max_bpc; } else if (connector->funcs->atomic_get_property) { return connector->funcs->atomic_get_property(connector, state, property, val); diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 2c23a48482da..7f763650a623 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -638,6 +638,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, if (old_connector_state->link_status != new_connector_state->link_status) new_crtc_state->connectors_changed = true; + + if (old_connector_state->max_bpc != + new_connector_state->max_bpc) + new_crtc_state->connectors_changed = true; } if (funcs->atomic_check) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 97ea41dc678f..9ce961ad28f9 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -460,6 +460,12 @@ struct drm_connector_state { * drm_writeback_signal_completion() */ struct drm_writeback_job *writeback_job; + + /** + * @max_bpc: Connector property to limit the maximum bit depth of + * the pixels. + */ + unsigned int max_bpc; }; /** @@ -923,6 +929,12 @@ struct drm_connector { */ struct drm_property_blob *path_blob_ptr; + /** + * @max_bpc_property: Default connector property for the max bpc to be + * driven out of the connector. + */ + struct drm_property *max_bpc_property; + #define DRM_CONNECTOR_POLL_HPD (1 << 0) #define DRM_CONNECTOR_POLL_CONNECT (1 << 1) #define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) -- 2.9.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp 2018-09-05 20:11 [PATCH v5 1/2] drm: Add connector property to limit max bpc Radhakrishna Sripada @ 2018-09-05 20:12 ` Radhakrishna Sripada 2018-09-05 22:02 ` [Intel-gfx] " Daniel Vetter 2018-09-06 11:36 ` Ville Syrjälä 2018-09-05 20:44 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v5,1/2] drm: Add connector property to limit max bpc Patchwork ` (2 subsequent siblings) 3 siblings, 2 replies; 7+ messages in thread From: Radhakrishna Sripada @ 2018-09-05 20:12 UTC (permalink / raw) To: intel-gfx; +Cc: Kishore Kadiyala, dri-devel, Rodrigo Vivi Use the newly added "max bpc" connector property to limit pipe bpp. V3: Use drm_connector_state to access the "max bpc" property V4: Initialize the drm property, add suuport to DP(Ville) V5: Use the property in the connector and fix CI failure(Ville) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Kishore Kadiyala <kishore.kadiyala@intel.com> Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> --- drivers/gpu/drm/i915/intel_display.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_hdmi.c | 7 +++++++ drivers/gpu/drm/i915/intel_modes.c | 20 ++++++++++++++++++++ 5 files changed, 61 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1bd14c61dab5..a890aade094c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10787,6 +10787,34 @@ connected_sink_compute_bpp(struct intel_connector *connector, } } +static void +connected_sink_max_bpp(struct drm_connector_state *conn_state, + struct intel_crtc_state *pipe_config) +{ + switch (conn_state->max_bpc) { + case 8: + case 9: + pipe_config->pipe_bpp = 8*3; + break; + case 10: + case 11: + pipe_config->pipe_bpp = 10*3; + break; + case 12: + case 13: + case 14: + case 15: + pipe_config->pipe_bpp = 12*3; + break; + case 16: + pipe_config->pipe_bpp = 16*3; + break; + default: + break; + } + DRM_DEBUG_KMS("Limiting display bpp to %d\n", pipe_config->pipe_bpp); +} + static int compute_baseline_pipe_bpp(struct intel_crtc *crtc, struct intel_crtc_state *pipe_config) @@ -10815,6 +10843,9 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc, if (connector_state->crtc != &crtc->base) continue; + if (connector_state->max_bpc) + connected_sink_max_bpp(connector_state, pipe_config); + connected_sink_compute_bpp(to_intel_connector(connector), pipe_config); } diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 436c22de33b6..3955745a4d9f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5719,6 +5719,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect intel_attach_force_audio_property(connector); intel_attach_broadcast_rgb_property(connector); + intel_attach_max_bpc_property(connector, 8, 16); if (intel_dp_is_edp(intel_dp)) { u32 allowed_scalers; diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index f5731215210a..b3c703dacc92 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1869,6 +1869,8 @@ int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); void intel_attach_force_audio_property(struct drm_connector *connector); void intel_attach_broadcast_rgb_property(struct drm_connector *connector); void intel_attach_aspect_ratio_property(struct drm_connector *connector); +void intel_attach_max_bpc_property(struct drm_connector *connector, int min, int + max); /* intel_overlay.c */ diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index a2dab0b6bde6..e649bbf07642 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -2109,11 +2109,18 @@ static const struct drm_encoder_funcs intel_hdmi_enc_funcs = { static void intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *connector) { + struct drm_i915_private *dev_priv = to_i915(connector->dev); + intel_attach_force_audio_property(connector); intel_attach_broadcast_rgb_property(connector); intel_attach_aspect_ratio_property(connector); drm_connector_attach_content_type_property(connector); connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE; + + if (HAS_GMCH_DISPLAY(dev_priv)) + intel_attach_max_bpc_property(connector, 8, 8); + else + intel_attach_max_bpc_property(connector, 8, 12); } /* diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c index ca44bf368e24..12f1238bad8a 100644 --- a/drivers/gpu/drm/i915/intel_modes.c +++ b/drivers/gpu/drm/i915/intel_modes.c @@ -133,3 +133,23 @@ intel_attach_aspect_ratio_property(struct drm_connector *connector) connector->dev->mode_config.aspect_ratio_property, DRM_MODE_PICTURE_ASPECT_NONE); } + +void +intel_attach_max_bpc_property(struct drm_connector *connector, int min, int + max) +{ + struct drm_device *dev = connector->dev; + struct drm_property *prop; + + prop = connector->max_bpc_property; + if (prop == NULL) { + prop = drm_property_create_range(dev, 0, "max bpc", min, max); + if (prop == NULL) + return; + + connector->max_bpc_property = prop; + } + + drm_object_attach_property(&connector->base, prop, max); + connector->state->max_bpc = max; +} -- 2.9.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada @ 2018-09-05 22:02 ` Daniel Vetter 2018-09-06 11:36 ` Ville Syrjälä 1 sibling, 0 replies; 7+ messages in thread From: Daniel Vetter @ 2018-09-05 22:02 UTC (permalink / raw) To: Radhakrishna Sripada; +Cc: intel-gfx, dri-devel, Kishore Kadiyala, Rodrigo Vivi On Wed, Sep 05, 2018 at 01:12:00PM -0700, Radhakrishna Sripada wrote: > Use the newly added "max bpc" connector property to limit pipe bpp. > > V3: Use drm_connector_state to access the "max bpc" property > V4: Initialize the drm property, add suuport to DP(Ville) > V5: Use the property in the connector and fix CI failure(Ville) > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Kishore Kadiyala <kishore.kadiyala@intel.com> > Cc: Manasi Navare <manasi.d.navare@intel.com> > Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> > --- > drivers/gpu/drm/i915/intel_display.c | 31 +++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_dp.c | 1 + > drivers/gpu/drm/i915/intel_drv.h | 2 ++ > drivers/gpu/drm/i915/intel_hdmi.c | 7 +++++++ > drivers/gpu/drm/i915/intel_modes.c | 20 ++++++++++++++++++++ > 5 files changed, 61 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 1bd14c61dab5..a890aade094c 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -10787,6 +10787,34 @@ connected_sink_compute_bpp(struct intel_connector *connector, > } > } > > +static void > +connected_sink_max_bpp(struct drm_connector_state *conn_state, > + struct intel_crtc_state *pipe_config) > +{ > + switch (conn_state->max_bpc) { > + case 8: > + case 9: > + pipe_config->pipe_bpp = 8*3; > + break; > + case 10: > + case 11: > + pipe_config->pipe_bpp = 10*3; > + break; > + case 12: > + case 13: > + case 14: > + case 15: > + pipe_config->pipe_bpp = 12*3; > + break; > + case 16: > + pipe_config->pipe_bpp = 16*3; > + break; > + default: > + break; > + } > + DRM_DEBUG_KMS("Limiting display bpp to %d\n", pipe_config->pipe_bpp); > +} > + > static int > compute_baseline_pipe_bpp(struct intel_crtc *crtc, > struct intel_crtc_state *pipe_config) > @@ -10815,6 +10843,9 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc, > if (connector_state->crtc != &crtc->base) > continue; > > + if (connector_state->max_bpc) > + connected_sink_max_bpp(connector_state, pipe_config); I think this could wold be best put into shared code, computing a max_bpc that takes connector->display_info and connector_state->max_bpc into account. So part of the core drm patch. Would need both a ->max_bpc and a ->max_requested_bpc for the property value or something like that. Besides this small nit I think this looks solid from a high level. -Daniel > + > connected_sink_compute_bpp(to_intel_connector(connector), > pipe_config); > } > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 436c22de33b6..3955745a4d9f 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -5719,6 +5719,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect > intel_attach_force_audio_property(connector); > > intel_attach_broadcast_rgb_property(connector); > + intel_attach_max_bpc_property(connector, 8, 16); > > if (intel_dp_is_edp(intel_dp)) { > u32 allowed_scalers; > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h > index f5731215210a..b3c703dacc92 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -1869,6 +1869,8 @@ int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); > void intel_attach_force_audio_property(struct drm_connector *connector); > void intel_attach_broadcast_rgb_property(struct drm_connector *connector); > void intel_attach_aspect_ratio_property(struct drm_connector *connector); > +void intel_attach_max_bpc_property(struct drm_connector *connector, int min, int > + max); > > > /* intel_overlay.c */ > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c > index a2dab0b6bde6..e649bbf07642 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -2109,11 +2109,18 @@ static const struct drm_encoder_funcs intel_hdmi_enc_funcs = { > static void > intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *connector) > { > + struct drm_i915_private *dev_priv = to_i915(connector->dev); > + > intel_attach_force_audio_property(connector); > intel_attach_broadcast_rgb_property(connector); > intel_attach_aspect_ratio_property(connector); > drm_connector_attach_content_type_property(connector); > connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE; > + > + if (HAS_GMCH_DISPLAY(dev_priv)) > + intel_attach_max_bpc_property(connector, 8, 8); > + else > + intel_attach_max_bpc_property(connector, 8, 12); > } > > /* > diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c > index ca44bf368e24..12f1238bad8a 100644 > --- a/drivers/gpu/drm/i915/intel_modes.c > +++ b/drivers/gpu/drm/i915/intel_modes.c > @@ -133,3 +133,23 @@ intel_attach_aspect_ratio_property(struct drm_connector *connector) > connector->dev->mode_config.aspect_ratio_property, > DRM_MODE_PICTURE_ASPECT_NONE); > } > + > +void > +intel_attach_max_bpc_property(struct drm_connector *connector, int min, int > + max) > +{ > + struct drm_device *dev = connector->dev; > + struct drm_property *prop; > + > + prop = connector->max_bpc_property; > + if (prop == NULL) { > + prop = drm_property_create_range(dev, 0, "max bpc", min, max); > + if (prop == NULL) > + return; > + > + connector->max_bpc_property = prop; > + } > + > + drm_object_attach_property(&connector->base, prop, max); > + connector->state->max_bpc = max; > +} > -- > 2.9.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada 2018-09-05 22:02 ` [Intel-gfx] " Daniel Vetter @ 2018-09-06 11:36 ` Ville Syrjälä 1 sibling, 0 replies; 7+ messages in thread From: Ville Syrjälä @ 2018-09-06 11:36 UTC (permalink / raw) To: Radhakrishna Sripada Cc: Stanislav Lisovskiy, intel-gfx, Kishore Kadiyala, Manasi Navare, dri-devel, Rodrigo Vivi On Wed, Sep 05, 2018 at 01:12:00PM -0700, Radhakrishna Sripada wrote: > Use the newly added "max bpc" connector property to limit pipe bpp. > > V3: Use drm_connector_state to access the "max bpc" property > V4: Initialize the drm property, add suuport to DP(Ville) > V5: Use the property in the connector and fix CI failure(Ville) > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Kishore Kadiyala <kishore.kadiyala@intel.com> > Cc: Manasi Navare <manasi.d.navare@intel.com> > Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> > --- > drivers/gpu/drm/i915/intel_display.c | 31 +++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_dp.c | 1 + > drivers/gpu/drm/i915/intel_drv.h | 2 ++ > drivers/gpu/drm/i915/intel_hdmi.c | 7 +++++++ > drivers/gpu/drm/i915/intel_modes.c | 20 ++++++++++++++++++++ > 5 files changed, 61 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 1bd14c61dab5..a890aade094c 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -10787,6 +10787,34 @@ connected_sink_compute_bpp(struct intel_connector *connector, > } > } > > +static void > +connected_sink_max_bpp(struct drm_connector_state *conn_state, > + struct intel_crtc_state *pipe_config) > +{ > + switch (conn_state->max_bpc) { > + case 8: > + case 9: > + pipe_config->pipe_bpp = 8*3; > + break; > + case 10: > + case 11: > + pipe_config->pipe_bpp = 10*3; > + break; > + case 12: > + case 13: > + case 14: > + case 15: > + pipe_config->pipe_bpp = 12*3; > + break; > + case 16: > + pipe_config->pipe_bpp = 16*3; > + break; > + default: > + break; > + } > + DRM_DEBUG_KMS("Limiting display bpp to %d\n", pipe_config->pipe_bpp); > +} > + > static int > compute_baseline_pipe_bpp(struct intel_crtc *crtc, > struct intel_crtc_state *pipe_config) > @@ -10815,6 +10843,9 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc, > if (connector_state->crtc != &crtc->base) > continue; > > + if (connector_state->max_bpc) > + connected_sink_max_bpp(connector_state, pipe_config); > + > connected_sink_compute_bpp(to_intel_connector(connector), > pipe_config); > } > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 436c22de33b6..3955745a4d9f 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -5719,6 +5719,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect > intel_attach_force_audio_property(connector); > > intel_attach_broadcast_rgb_property(connector); > + intel_attach_max_bpc_property(connector, 8, 16); IIRC gmch platforms can't do more than 10bpc, and the rest are limited to 12bpc. > > if (intel_dp_is_edp(intel_dp)) { > u32 allowed_scalers; > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h > index f5731215210a..b3c703dacc92 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -1869,6 +1869,8 @@ int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); > void intel_attach_force_audio_property(struct drm_connector *connector); > void intel_attach_broadcast_rgb_property(struct drm_connector *connector); > void intel_attach_aspect_ratio_property(struct drm_connector *connector); > +void intel_attach_max_bpc_property(struct drm_connector *connector, int min, int > + max); > > > /* intel_overlay.c */ > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c > index a2dab0b6bde6..e649bbf07642 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -2109,11 +2109,18 @@ static const struct drm_encoder_funcs intel_hdmi_enc_funcs = { > static void > intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *connector) > { > + struct drm_i915_private *dev_priv = to_i915(connector->dev); > + > intel_attach_force_audio_property(connector); > intel_attach_broadcast_rgb_property(connector); > intel_attach_aspect_ratio_property(connector); > drm_connector_attach_content_type_property(connector); > connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE; > + > + if (HAS_GMCH_DISPLAY(dev_priv)) > + intel_attach_max_bpc_property(connector, 8, 8); Not sure exposing the prop makes much sense when you can't modify it. > + else > + intel_attach_max_bpc_property(connector, 8, 12); > } > > /* > diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c > index ca44bf368e24..12f1238bad8a 100644 > --- a/drivers/gpu/drm/i915/intel_modes.c > +++ b/drivers/gpu/drm/i915/intel_modes.c > @@ -133,3 +133,23 @@ intel_attach_aspect_ratio_property(struct drm_connector *connector) > connector->dev->mode_config.aspect_ratio_property, > DRM_MODE_PICTURE_ASPECT_NONE); > } > + > +void > +intel_attach_max_bpc_property(struct drm_connector *connector, int min, int > + max) > +{ > + struct drm_device *dev = connector->dev; > + struct drm_property *prop; > + > + prop = connector->max_bpc_property; > + if (prop == NULL) { > + prop = drm_property_create_range(dev, 0, "max bpc", min, max); > + if (prop == NULL) > + return; > + > + connector->max_bpc_property = prop; > + } > + > + drm_object_attach_property(&connector->base, prop, max); > + connector->state->max_bpc = max; > +} There's nothing i915 specific in this function, so might as well move it to the core. -- Ville Syrjälä Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [v5,1/2] drm: Add connector property to limit max bpc 2018-09-05 20:11 [PATCH v5 1/2] drm: Add connector property to limit max bpc Radhakrishna Sripada 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada @ 2018-09-05 20:44 ` Patchwork 2018-09-05 21:02 ` ✓ Fi.CI.BAT: success " Patchwork 2018-09-06 5:18 ` ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2018-09-05 20:44 UTC (permalink / raw) To: Radhakrishna Sripada; +Cc: intel-gfx == Series Details == Series: series starting with [v5,1/2] drm: Add connector property to limit max bpc URL : https://patchwork.freedesktop.org/series/49230/ State : warning == Summary == $ dim checkpatch origin/drm-tip 2c48291891eb drm: Add connector property to limit max bpc 44f00038f508 drm/i915: Allow "max bpc" property to limit pipe_bpp -:32: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #32: FILE: drivers/gpu/drm/i915/intel_display.c:10792: +connected_sink_max_bpp(struct drm_connector_state *conn_state, + struct intel_crtc_state *pipe_config) -:37: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #37: FILE: drivers/gpu/drm/i915/intel_display.c:10797: + pipe_config->pipe_bpp = 8*3; ^ -:41: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #41: FILE: drivers/gpu/drm/i915/intel_display.c:10801: + pipe_config->pipe_bpp = 10*3; ^ -:47: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #47: FILE: drivers/gpu/drm/i915/intel_display.c:10807: + pipe_config->pipe_bpp = 12*3; ^ -:50: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #50: FILE: drivers/gpu/drm/i915/intel_display.c:10810: + pipe_config->pipe_bpp = 16*3; ^ -:136: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!prop" #136: FILE: drivers/gpu/drm/i915/intel_modes.c:145: + if (prop == NULL) { -:138: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!prop" #138: FILE: drivers/gpu/drm/i915/intel_modes.c:147: + if (prop == NULL) total: 0 errors, 0 warnings, 7 checks, 99 lines checked _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [v5,1/2] drm: Add connector property to limit max bpc 2018-09-05 20:11 [PATCH v5 1/2] drm: Add connector property to limit max bpc Radhakrishna Sripada 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada 2018-09-05 20:44 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v5,1/2] drm: Add connector property to limit max bpc Patchwork @ 2018-09-05 21:02 ` Patchwork 2018-09-06 5:18 ` ✓ Fi.CI.IGT: " Patchwork 3 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2018-09-05 21:02 UTC (permalink / raw) To: Radhakrishna Sripada; +Cc: intel-gfx == Series Details == Series: series starting with [v5,1/2] drm: Add connector property to limit max bpc URL : https://patchwork.freedesktop.org/series/49230/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4775 -> Patchwork_10102 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/49230/revisions/1/mbox/ == Known issues == Here are the changes found in Patchwork_10102 that come from known issues: === IGT changes === ==== Issues hit ==== igt@debugfs_test@read_all_entries: fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713) igt@drv_module_reload@basic-reload: fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718) ==== Possible fixes ==== igt@drv_selftest@live_coherency: fi-gdg-551: DMESG-FAIL (fdo#107164) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS igt@kms_psr@primary_page_flip: fi-cnl-psr: FAIL (fdo#107336) -> PASS fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164 fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336 fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362 fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718 == Participating hosts (54 -> 49) == Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4775 -> Patchwork_10102 CI_DRM_4775: 1a2bb6c061217718b972b3f4a74b96b61cf19d0c @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4630: 86686c6e2f7c6f0944bced11550e06d20bc6957f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_10102: 44f00038f50883e84572b1f94e54ea272d478557 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 44f00038f508 drm/i915: Allow "max bpc" property to limit pipe_bpp 2c48291891eb drm: Add connector property to limit max bpc == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10102/issues.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [v5,1/2] drm: Add connector property to limit max bpc 2018-09-05 20:11 [PATCH v5 1/2] drm: Add connector property to limit max bpc Radhakrishna Sripada ` (2 preceding siblings ...) 2018-09-05 21:02 ` ✓ Fi.CI.BAT: success " Patchwork @ 2018-09-06 5:18 ` Patchwork 3 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2018-09-06 5:18 UTC (permalink / raw) To: Radhakrishna Sripada; +Cc: intel-gfx == Series Details == Series: series starting with [v5,1/2] drm: Add connector property to limit max bpc URL : https://patchwork.freedesktop.org/series/49230/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4775_full -> Patchwork_10102_full = == Summary - SUCCESS == No regressions found. == Known issues == Here are the changes found in Patchwork_10102_full that come from known issues: === IGT changes === ==== Issues hit ==== igt@drv_suspend@shrink: shard-glk: PASS -> FAIL (fdo#106886) igt@kms_draw_crc@draw-method-rgb565-mmap-wc-xtiled: shard-glk: PASS -> FAIL (fdo#103184) igt@kms_flip@flip-vs-expired-vblank: shard-glk: PASS -> FAIL (fdo#105363) igt@kms_flip@flip-vs-expired-vblank-interruptible: shard-glk: PASS -> FAIL (fdo#102887, fdo#105363) ==== Possible fixes ==== igt@gem_exec_big: shard-hsw: INCOMPLETE (fdo#103540) -> PASS igt@kms_flip@modeset-vs-vblank-race-interruptible: shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887 fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184 fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359 fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540 fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363 fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886 k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4775 -> Patchwork_10102 CI_DRM_4775: 1a2bb6c061217718b972b3f4a74b96b61cf19d0c @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4630: 86686c6e2f7c6f0944bced11550e06d20bc6957f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_10102: 44f00038f50883e84572b1f94e54ea272d478557 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10102/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-09-06 11:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-09-05 20:11 [PATCH v5 1/2] drm: Add connector property to limit max bpc Radhakrishna Sripada 2018-09-05 20:12 ` [PATCH v5 2/2] drm/i915: Allow "max bpc" property to limit pipe_bpp Radhakrishna Sripada 2018-09-05 22:02 ` [Intel-gfx] " Daniel Vetter 2018-09-06 11:36 ` Ville Syrjälä 2018-09-05 20:44 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v5,1/2] drm: Add connector property to limit max bpc Patchwork 2018-09-05 21:02 ` ✓ Fi.CI.BAT: success " Patchwork 2018-09-06 5:18 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.