From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 2/2] drm/i915: pass ELD to HDMI/DP audio driver Date: Mon, 5 Sep 2011 14:50:42 +0800 Message-ID: <20110905065042.GB20230@localhost> References: <20110905062320.GA7535@localhost> <20110905062534.GA20230@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20110905062534.GA20230@localhost> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Keith Packard Cc: "alsa-devel@alsa-project.org" , Wang Zhenyu , "intel-gfx@lists.freedesktop..." , "dri-devel@lists.freedesktop.org" , Chris Wilson , Zhao Yakui , "Fu, Michael" , Ben Skeggs , James Cloos , Christopher White , Jeremy Bush , Paul Menzel , Pierre-Louis Bossart List-Id: intel-gfx@lists.freedesktop.org I'd like to do more cleanups: > + int aud_cntl_st; > + int aud_cntrl_st2; s/aud_cntrl_st2/aud_cntl_st2/ > + if (IS_IVYBRIDGE(connector->dev)) { > + hdmiw_hdmiedid = GEN7_HDMIW_HDMIEDID_A; > + aud_cntl_st = GEN7_AUD_CNTRL_ST_A; > + aud_cntrl_st2 = GEN7_AUD_CNTRL_ST2; > + } else { > + hdmiw_hdmiedid = GEN5_HDMIW_HDMIEDID_A; > + aud_cntl_st = GEN5_AUD_CNTL_ST_A; > + aud_cntrl_st2 = GEN5_AUD_CNTL_ST2; > + } > + > + i = to_intel_crtc(crtc)->pipe; > + hdmiw_hdmiedid += i * 0x100; > + aud_cntl_st += i * 0x100; > + > + DRM_DEBUG_DRIVER("ELD on pipe %c\n", pipe_name(i)); [...] > + len = min_t(uint8_t, eld[2], 21); /* 84 bytes of hw ELD buffer */ > + DRM_DEBUG_DRIVER("ELD size %d\n", len); Merge the above two DRM_DEBUG_DRIVER() calls into: + DRM_DEBUG_DRIVER("writing %d ELD dword(s) on pipe %c\n", + len, pipe_name(to_intel_crtc(crtc)->pipe)); > + for (i = 0; i < len; i++) > + I915_WRITE(hdmiw_hdmiedid, *((uint32_t *)eld + i)); Thanks, Fengguang