From: Thierry Reding Subject: Re: [RFC v2 5/5] drm/i915: Use generic HDMI infoframe helpers Date: Fri, 7 Dec 2012 08:28:10 +0100 Message-ID: <20121207072810.GB3058@avionic-0098.adnet.avionic-design.de> References: <1354725944-1862-1-git-send-email-thierry.reding@avionic-design.de> <1354725944-1862-6-git-send-email-thierry.reding@avionic-design.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1809238281==" Return-path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 69839E5C05 for ; Thu, 6 Dec 2012 23:28:14 -0800 (PST) In-Reply-To: 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: Paulo Zanoni Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1809238281== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 06, 2012 at 02:55:23PM -0200, Paulo Zanoni wrote: > Hi >=20 > 2012/12/6 Paulo Zanoni : > > Hi > > > > 2012/12/5 Thierry Reding : > >> Use the generic HDMI infoframe helpers to get rid of the duplicate > >> implementation in the i915 driver. > > > > A few comments: > > > > - I've compiled your patches and now "intel_infoframes -d" tells my my > > infoframes are full of zeroes. So there's a bug somewhere... I have to > > say that the i915 infoframe registers are quite complicated and it > > took me a long time to fix a lot of its problems, so please don't > > break it and read below for a suggestion :) > > > > - Why do we need that kconfig stuff? Why not just put all the code > > inside drivers/gpu/drm? > > > > - I really like having "common code between drivers merged", but I > > really don't see how the i915 driver is benefiting from this change. > > We're just basically complicating intel_hdmi.c to use a new struct > > that doesn't fit our needs due to the lack of the ECC byte. My idea: > > Instead of calling hdmi_avi_infoframe_pack, why don't we just > > implement intel_hdmi_avi_infoframe_pack that converts a "struct > > hdmi_avi_infoframe" into our own good-old "struct dip_infoframe" that > > has the cool ECC value in the right place? This would probably > > drastically reduce your chances of introducing bugs in our code :) >=20 > Just to be a little bit more clear about this paragraph since Daniel > asked me a few questions: >=20 > For the changes inside intel_hdmi.c, I'd really like your patch to not > touch any of the "write_infoframe" or "set_infoframes" callbacks. I > think you can do everything by just patching intel_set_infoframe, > intel_hdmi_set_avi_infoframe and intel_hdmi_set_spd_infoframe. In one > of those functions you could call something like > "intel_hdmi_infoframe_pack(struct hdmi_avi_infoframe, struct > dip_infoframe)" and then proceed. This way you don 't need to touch > the code that actually writes stuff to the hardware. I think I already explained in my previous mail how IMO this completely defeats the purpose of this patch series. Furthermore the functions that write the infoframes to the hardware themselves could use some refactoring of their own. There is a lot of duplication there. Thierry --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJQwZqKAAoJEN0jrNd/PrOhvtwP/jBpwn7v382yzWGKLR8cd0q2 09qBJmA5DQAJi3m615RZfU9V8BgcELuIUSXeXY6gQ1pL1IJl9pJ6L98T9vawyEzF 2eRMXMSxHKX9iCXbq0D7z1VoQcwS9hBQUZkaujhiwTXewW/M+cpbdRXU3g5866XV azydWeauxc5K1XYYtRcLcgw4byxZ5tgg/8tUk+pkg75SpkNetG2tPsXS9pFeYA2e kcFVcO/Brq/8EZxqSbkghy6jsu9QNB+aU7gkqCTmljH1gR63VXR9FpK7+LQrMzn6 yG7ZishHKyuW9gwNAHtZfHAmWdLdu/KVq2KRLsj35mLOTVSHQKBgtEzOmhOGP4fq YoEQLoD1Ls0UZDMD/9sFshRpEbwiM9qfqV6zrEHj1iL6fbwfE8LxnICUAfy62jfk Fs0mplcbgoug4D10qhikaXvWm2zlRRZJ1NmddDNv7U/xrqmTf2q/pd3kWOA0b+1D w74ZUzg11C0NvaWckkslPAvxYtTS0jeSC017Bkl6tI9T9Vt+o5mxf//bVcWbIM/y cOL8G+97eK0bt+V66oK8npfDT5nS9bQy1AF7D38YKpYK4/N9M631OcTl4ybN/SQ9 CaQxSrfEX4GKVv4atBnOUU3T6pclGU0ZBsNKsROCxSRcPipXry0mZb40ni3k0IDu g1enyGZWKqR7FyN15KVX =wx4w -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt-- --===============1809238281== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1809238281==--