Message ID | 20190708125325.16576-3-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Plane cdclk requirements and fp16 for gen4+ | expand |
On Mon, 2019-07-08 at 15:53 +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Allow drivers to call drm_atomic_helper_check_modeset() without > having the crtc helper funcs specified. i915 doesn't need those > anymore. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/drm_atomic_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > b/drivers/gpu/drm/drm_atomic_helper.c > index aa16ea17ff9b..fb2ce692ae5b 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -481,7 +481,7 @@ mode_fixup(struct drm_atomic_state *state) > continue; > > funcs = crtc->helper_private; > - if (!funcs->mode_fixup) > + if (!funcs || !funcs->mode_fixup) > continue; > > ret = funcs->mode_fixup(crtc, &new_crtc_state->mode, But it still won't allow to call anything from here, if no funcs or no mode_fixup is specified. Anyway seems to be a good idea to check both funcs or funcs->mode_fixup being NULL, just don't get the commit message a bit :) - Stanislav
On Thu, Sep 05, 2019 at 06:38:30AM +0000, Lisovskiy, Stanislav wrote: > On Mon, 2019-07-08 at 15:53 +0300, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Allow drivers to call drm_atomic_helper_check_modeset() without > > having the crtc helper funcs specified. i915 doesn't need those > > anymore. > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > --- > > drivers/gpu/drm/drm_atomic_helper.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > > b/drivers/gpu/drm/drm_atomic_helper.c > > index aa16ea17ff9b..fb2ce692ae5b 100644 > > --- a/drivers/gpu/drm/drm_atomic_helper.c > > +++ b/drivers/gpu/drm/drm_atomic_helper.c > > @@ -481,7 +481,7 @@ mode_fixup(struct drm_atomic_state *state) > > continue; > > > > funcs = crtc->helper_private; > > - if (!funcs->mode_fixup) > > + if (!funcs || !funcs->mode_fixup) > > continue; > > > > ret = funcs->mode_fixup(crtc, &new_crtc_state->mode, > > But it still won't allow to call anything from here, if no funcs or no > mode_fixup is specified. Anyway seems to be a good idea to check both > funcs or funcs->mode_fixup being NULL, just don't get the commit > message a bit :) NULL->mode_fixup will oops.
On Mon, 2019-07-08 at 15:53 +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Allow drivers to call drm_atomic_helper_check_modeset() without > having the crtc helper funcs specified. i915 doesn't need those > anymore. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/drm_atomic_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > b/drivers/gpu/drm/drm_atomic_helper.c > index aa16ea17ff9b..fb2ce692ae5b 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -481,7 +481,7 @@ mode_fixup(struct drm_atomic_state *state) > continue; > > funcs = crtc->helper_private; > - if (!funcs->mode_fixup) > + if (!funcs || !funcs->mode_fixup) > continue; > > ret = funcs->mode_fixup(crtc, &new_crtc_state->mode,
On Wed, Sep 18, 2019 at 01:42:09PM +0000, Lisovskiy, Stanislav wrote: > On Mon, 2019-07-08 at 15:53 +0300, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Allow drivers to call drm_atomic_helper_check_modeset() without > > having the crtc helper funcs specified. i915 doesn't need those > > anymore. > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > --- > > drivers/gpu/drm/drm_atomic_helper.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> 1-2 pushed to drm-misc-next. The rest shall wait until those two make the roundtrip back to dinq. Thanks for the reviews. > > > > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > > b/drivers/gpu/drm/drm_atomic_helper.c > > index aa16ea17ff9b..fb2ce692ae5b 100644 > > --- a/drivers/gpu/drm/drm_atomic_helper.c > > +++ b/drivers/gpu/drm/drm_atomic_helper.c > > @@ -481,7 +481,7 @@ mode_fixup(struct drm_atomic_state *state) > > continue; > > > > funcs = crtc->helper_private; > > - if (!funcs->mode_fixup) > > + if (!funcs || !funcs->mode_fixup) > > continue; > > > > ret = funcs->mode_fixup(crtc, &new_crtc_state->mode,
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index aa16ea17ff9b..fb2ce692ae5b 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -481,7 +481,7 @@ mode_fixup(struct drm_atomic_state *state) continue; funcs = crtc->helper_private; - if (!funcs->mode_fixup) + if (!funcs || !funcs->mode_fixup) continue; ret = funcs->mode_fixup(crtc, &new_crtc_state->mode,