From: Chris Wilson Subject: Re: [PATCH 17/20] drm: remove checks for same value in set_prop Date: Wed, 01 Feb 2012 11:55:44 +0000 Message-ID: References: <1328092718-28951-1-git-send-email-s.hauer@pengutronix.de> <1328092718-28951-18-git-send-email-s.hauer@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 483D29E9FE for ; Wed, 1 Feb 2012 03:55:50 -0800 (PST) In-Reply-To: <1328092718-28951-18-git-send-email-s.hauer@pengutronix.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Sascha Hauer , dri-devel@lists.freedesktop.org Cc: kernel@pengutronix.de List-Id: dri-devel@lists.freedesktop.org On Wed, 1 Feb 2012 11:38:35 +0100, Sascha Hauer 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. -Chris -- Chris Wilson, Intel Open Source Technology Centre