From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 21/29] drm/i915: initialize DDI buffer translations Date: Fri, 13 Apr 2012 22:05:22 +0100 Message-ID: <1334351133_415873@CP5-2952> References: <1334347745-11743-1-git-send-email-eugeni.dodonov@intel.com> <1334347745-11743-22-git-send-email-eugeni.dodonov@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 658CDA0E4B for ; Fri, 13 Apr 2012 14:05:37 -0700 (PDT) In-Reply-To: <1334347745-11743-22-git-send-email-eugeni.dodonov@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: intel-gfx@lists.freedesktop.org Cc: Eugeni Dodonov List-Id: intel-gfx@lists.freedesktop.org On Fri, 13 Apr 2012 17:08:57 -0300, Eugeni Dodonov wrote: > + /* Those registers seem to be double-buffered, so write them twice */ > + for (j=0; j < 2; j++) { > + for (i=0, reg=DDI_BUF_TRANS(port); i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) { > + I915_WRITE(reg, > + (use_fdi_mode) ? > + hsw_ddi_translations_fdi[i] : > + hsw_ddi_translations_dp[i]); If you use a temporary variable for the translation table ptr (and moved it out of the loop), these writes would fit into 80 columns and be much more readable. -Chris -- Chris Wilson, Intel Open Source Technology Centre