Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On 9/28/2022 5:24 AM, Johan Hovold wrote: On Tue, Sep 27, 2022 at 11:42:53AM -0700, Abhinav Kumar wrote: On 9/27/2022 12:14 AM, Johan Hovold wrote: On Mon, Sep 26, 2022 at 11:17:20AM -0700, Abhinav Kumar wrote: On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold The change LGTM, hence Reviewed-by: Abhinav Kumar I think we can use below fixes tag so that we can pick up this entire series for the fixes cycle. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Perhaps that's a requirement for drm, but I wouldn't add a Fixes tag for this otherwise as it's not a bug. You also have to watch out for Sasha and his autosel scripts which will probably try to backport this to stable if it finds a Fixes tag. Discussed with Rob on IRC, we will apply everything except the last two patches of this series in the -fixes and take these two for the next kernel rev push. So the fixes go in 6.0 and the two follow-on cleanups in 6.1? Or did you mean 6.1 and 6.2? Johan The fixes will go in 6.1 first. The two follow-on cleanups in 6.2. Thanks Abhinav
Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On Tue, Sep 27, 2022 at 11:42:53AM -0700, Abhinav Kumar wrote: > On 9/27/2022 12:14 AM, Johan Hovold wrote: > > On Mon, Sep 26, 2022 at 11:17:20AM -0700, Abhinav Kumar wrote: > >> On 9/13/2022 1:53 AM, Johan Hovold wrote: > >>> Drop the overly defensive modeset sanity checks of function parameters > >>> which have already been checked or used by the callers. > >>> > >>> Reviewed-by: Dmitry Baryshkov > >>> Signed-off-by: Johan Hovold > >> > >> The change LGTM, hence > >> > >> Reviewed-by: Abhinav Kumar > >> > >> I think we can use below fixes tag so that we can pick up this entire > >> series for the fixes cycle. > >> > >> Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") > > > > Perhaps that's a requirement for drm, but I wouldn't add a Fixes tag for > > this otherwise as it's not a bug. > > > > You also have to watch out for Sasha and his autosel scripts which will > > probably try to backport this to stable if it finds a Fixes tag. > Discussed with Rob on IRC, we will apply everything except the last two > patches of this series in the -fixes and take these two for the next > kernel rev push. So the fixes go in 6.0 and the two follow-on cleanups in 6.1? Or did you mean 6.1 and 6.2? Johan
Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On 9/27/2022 12:14 AM, Johan Hovold wrote: On Mon, Sep 26, 2022 at 11:17:20AM -0700, Abhinav Kumar wrote: On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold The change LGTM, hence Reviewed-by: Abhinav Kumar I think we can use below fixes tag so that we can pick up this entire series for the fixes cycle. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Perhaps that's a requirement for drm, but I wouldn't add a Fixes tag for this otherwise as it's not a bug. You also have to watch out for Sasha and his autosel scripts which will probably try to backport this to stable if it finds a Fixes tag. Johan Discussed with Rob on IRC, we will apply everything except the last two patches of this series in the -fixes and take these two for the next kernel rev push.
Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On Mon, Sep 26, 2022 at 11:17:20AM -0700, Abhinav Kumar wrote: > On 9/13/2022 1:53 AM, Johan Hovold wrote: > > Drop the overly defensive modeset sanity checks of function parameters > > which have already been checked or used by the callers. > > > > Reviewed-by: Dmitry Baryshkov > > Signed-off-by: Johan Hovold > > The change LGTM, hence > > Reviewed-by: Abhinav Kumar > > I think we can use below fixes tag so that we can pick up this entire > series for the fixes cycle. > > Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Perhaps that's a requirement for drm, but I wouldn't add a Fixes tag for this otherwise as it's not a bug. You also have to watch out for Sasha and his autosel scripts which will probably try to backport this to stable if it finds a Fixes tag. Johan
Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold The change LGTM, hence Reviewed-by: Abhinav Kumar I think we can use below fixes tag so that we can pick up this entire series for the fixes cycle. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") --- drivers/gpu/drm/msm/dp/dp_display.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 808a516e84c5..33daec11f813 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1607,15 +1607,10 @@ static int dp_display_get_next_bridge(struct msm_dp *dp) int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, struct drm_encoder *encoder) { - struct msm_drm_private *priv; + struct msm_drm_private *priv = dev->dev_private; struct dp_display_private *dp_priv; int ret; - if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev)) - return -EINVAL; - - priv = dev->dev_private; - if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { DRM_DEV_ERROR(dev->dev, "too many bridges\n"); return -ENOSPC;
Re: [Freedreno] [PATCH v2 09/10] drm/msm/dp: drop modeset sanity checks
On 9/13/2022 1:53 AM, Johan Hovold wrote: Drop the overly defensive modeset sanity checks of function parameters which have already been checked or used by the callers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_display.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 808a516e84c5..33daec11f813 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -1607,15 +1607,10 @@ static int dp_display_get_next_bridge(struct msm_dp *dp) int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev, struct drm_encoder *encoder) { - struct msm_drm_private *priv; + struct msm_drm_private *priv = dev->dev_private; struct dp_display_private *dp_priv; int ret; - if (WARN_ON(!encoder) || WARN_ON(!dp_display) || WARN_ON(!dev)) - return -EINVAL; - - priv = dev->dev_private; - if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { DRM_DEV_ERROR(dev->dev, "too many bridges\n"); return -ENOSPC;