From: Daniel Vetter Subject: Re: [PATCH 1/2] drm/i915: WARN is the DP aux read or write is too big Date: Tue, 17 Sep 2013 17:23:47 +0200 Message-ID: <20130917152347.GO32145@phenom.ffwll.local> References: <1379427251-1457-1-git-send-email-przanoni@gmail.com> <87six3lbsc.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) by gabe.freedesktop.org (Postfix) with ESMTP id ECC20E722E for ; Tue, 17 Sep 2013 08:23:32 -0700 (PDT) Received: by mail-ea0-f174.google.com with SMTP id z15so2816434ead.5 for ; Tue, 17 Sep 2013 08:23:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87six3lbsc.fsf@intel.com> 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: Jani Nikula Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Tue, Sep 17, 2013 at 06:15:31PM +0300, Jani Nikula wrote: > On Tue, 17 Sep 2013, Paulo Zanoni wrote: > > From: Paulo Zanoni > > > > So far we control everything and nothing exceeds the current limits, > > but (i) we never think about these limits when reviewing patches, (ii) > > not all the callers check the return values and (iii) if we ever hit > > any of these messages, we'll have to fix the code that added the bad > > message. > > > > The current limit for these messages is 20 since we only have 5 data > > registers on all the current gens. > > > > The checks inside intel_dp_aux_native_{write,read} are to prevent > > buffer overflows. The check inside intel_dp_aux_ch is to prevent > > writing past our 5 data registers. > > I wish there were fewer magic values, but it does what it says on the > box. > > Reviewed-by: Jani Nikula Is that for both patches? I've merged the first one for now to dinq ... Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch