All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: kernel@pengutronix.de, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 17/20] drm: remove checks for same value in set_prop
Date: Wed, 01 Feb 2012 12:23:50 +0000	[thread overview]
Message-ID: <f80fcd$3biamc@fmsmga001.fm.intel.com> (raw)
In-Reply-To: <20120201121344.GR1990@pengutronix.de>

On Wed, 1 Feb 2012 13:13:44 +0100, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Wed, Feb 01, 2012 at 11:55:44AM +0000, Chris Wilson wrote:
> > On Wed,  1 Feb 2012 11:38:35 +0100, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > > The drivers currently check in set_property whether the property is
> > > unchanged. move this check into the core and do not bother the drivers
> > > with checking for unchanged properties.
> > 
> > This patch seems to have functional side-effects beyond the description.
> > 
> > For example,
> > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > > index db3b461..0024b59 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -2223,9 +2223,6 @@ intel_dp_set_property(struct drm_connector *connector,
> > >  		int i = val;
> > >  		bool has_audio;
> > >  
> > > -		if (i == intel_dp->force_audio)
> > > -			return 0;
> > > -
> > 
> > Here we are checking against the current value of the intel_dp, which
> > may in theory be modified elsewhere as well, and avoiding the modeswitch
> > if it is unnecessary.
> 
> In case of force_audio I just checked that the current value is not
> changed elsewhere, but I must admit that I haven't checked this for
> all other properties. Would the patch be ok if I review for side
> effects?
> 
> BTW if someone changes the underlying variable of a property outside
> of the .set_property callback there are likely problems elsewhere
> because without calling drm_connector_property_set_value the values
> of the variable and the property backing store will be inconsistent.
> The calls to drm_connector_property_set_value in turn are quite easy
> reviewable, those are very few.

Sure, it just jumped out as being not in the same pattern as the rest.
I'd break out the ones that are different, like intel_dp, into their own
patch so that the above analysis can be recorded along with the change
and that we have something easy to bisect/change-our-minds about later.
;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-02-01 12:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 10:38 [PATCH] drm cleanup patches Sascha Hauer
2012-02-01 10:38 ` [PATCH 01/20] drm crtc: use drm_mode_destroy instead of kfree in drm_mode_remove Sascha Hauer
2012-02-01 10:38 ` [PATCH 02/20] drm crtc: add forgotten idr cleanup functions Sascha Hauer
2012-02-01 10:38 ` [PATCH 03/20] drm drm_edit: drm modes have to be free with drm_mode_destroy Sascha Hauer
2012-02-01 10:38 ` [PATCH 04/20] drm drm_fb_helper: destroy modes Sascha Hauer
2012-02-01 10:38 ` [PATCH 05/20] drm: add proper return value for drm_mode_crtc_set_gamma_size Sascha Hauer
2012-02-01 10:38 ` [PATCH 06/20] drm fb helper: use drm_helper_connector_dpms to do dpms Sascha Hauer
2012-02-01 10:38 ` [PATCH 07/20] drm fb helper: remove unused variable conn_limit Sascha Hauer
2012-02-01 10:38 ` [PATCH 08/20] drm fb helper: remove unused variable crtc_id Sascha Hauer
2012-02-01 10:38 ` [PATCH 09/20] drm fb_helper: use lists for crtcs Sascha Hauer
2012-02-03 10:04   ` Dave Airlie
2012-02-04 10:47     ` Sascha Hauer
2012-02-04 11:21       ` Dave Airlie
2012-02-06 11:08         ` Sascha Hauer
2012-02-01 10:38 ` [PATCH 10/20] drm: remove now unused crtc_count parameter from drm_fb_helper_init Sascha Hauer
2012-02-01 10:38 ` [PATCH 11/20] drm fb helper: add the connectors inside drm_fb_helper_initial_config Sascha Hauer
2012-02-01 10:38 ` [PATCH 12/20] drm crtc_helper: use list_for_each_entry Sascha Hauer
2012-02-01 10:38 ` [PATCH 13/20] drm crtc: Fix locking comments Sascha Hauer
2012-02-01 10:38 ` [PATCH 14/20] drm: add convenience function to create an enum property Sascha Hauer
2012-02-01 11:48   ` Chris Wilson
2012-02-01 11:53     ` Sascha Hauer
2012-02-01 12:55     ` David Airlie
2012-02-01 13:05       ` Sascha Hauer
2012-02-01 14:00         ` Daniel Vetter
2012-02-03 10:08         ` Dave Airlie
2012-02-03 23:40           ` Sascha Hauer
2012-02-01 10:38 ` [PATCH 15/20] drm: add convenience function to create an range property Sascha Hauer
2012-02-01 11:34   ` Chris Wilson
2012-02-01 10:38 ` [PATCH 16/20] drm: store connector properties in list Sascha Hauer
2012-02-01 10:38 ` [PATCH 17/20] drm: remove checks for same value in set_prop Sascha Hauer
2012-02-01 11:55   ` Chris Wilson
2012-02-01 12:13     ` Sascha Hauer
2012-02-01 12:23       ` Chris Wilson [this message]
2012-02-01 10:38 ` [PATCH 18/20] drm: do not call drm_connector_property_set_value from drivers Sascha Hauer
2012-02-01 10:38 ` [PATCH 19/20] drm exynos: use drm_fb_helper_set_par directly Sascha Hauer
2012-02-02  2:25   ` Inki Dae
2012-02-01 10:38 ` [PATCH 20/20] drm: do not set fb_info->pixmap fields Sascha Hauer
2012-02-01 12:00   ` Chris Wilson
2012-02-02 14:13 ` [PATCH] drm cleanup patches Sascha Hauer
2012-02-03 10:21   ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='f80fcd$3biamc@fmsmga001.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.