From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Fix RC6VIDS encode/devoce Date: Mon, 4 Feb 2013 18:55:55 +0100 Message-ID: <20130204175522.GA5813@phenom.ffwll.local> References: <20130201140750.GA25600@elgon.mountain> <1359765674-4903-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1359765674-4903-1-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org, stable@kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Feb 01, 2013 at 04:41:14PM -0800, Ben Widawsky wrote: > The RC6 VIDS has a linear ramp starting at 250mv, which means any values > below 250 are invalid. The old buggy macros tried to adjust for this to > be more flexible, but there is no need. As Dan pointed out the ENCODE > only ever has one value. The only invalid value for decode is an input > of 0 which means something is really wonky, and the cases where DECODE > are used either don't matter (debug values), or would be implicitly > correct (the check for less than 450). > > This patch makes simpler, easier to read macros which are actually > correct. Maybe this patch can actually fix some bugs now. > > Thanks to Dan for catching this. /me hides > > Cc: stable@kernel.org > Reported-by: Dan Carpenter > Signed-off-by: Ben Widawsky Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch