From: Thierry Reding <thierry.reding@avionic-design.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC v2 5/5] drm/i915: Use generic HDMI infoframe helpers
Date: Fri, 7 Dec 2012 09:49:12 +0100 [thread overview]
Message-ID: <20121207084912.GA9427@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <CAKMK7uG1R4v_qS_zGJ6MCYcfpno5LTFehcFWN7Pb2KYP5X_vmw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3126 bytes --]
On Fri, Dec 07, 2012 at 09:30:34AM +0100, Daniel Vetter wrote:
> On Fri, Dec 7, 2012 at 8:28 AM, Thierry Reding
> <thierry.reding@avionic-design.de> wrote:
> > On Thu, Dec 06, 2012 at 02:55:23PM -0200, Paulo Zanoni wrote:
> >> 2012/12/6 Paulo Zanoni <przanoni@gmail.com>:
> >> 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.
>
> I agree with Paulo that we shouldn't touch the hw interfacing
> functions - we've had too many bugs and regressions in there, so
> burned child et al applies. Now I also disagreed with Paulo's idea to
> keep around the infoframe stuff completed for intel_hdmi.c - common
> frameworks for sink handling are useful, if only that if forces people
> to yell at each another and discovered that way how utterly broken
> real world hw is ;-)
>
> I think the idea Paulo proposed in the first reply of keeping our own
> infoframe packing code, but using the new data structures to construct
> it is worse than the current code: Other people will extend the
> helpers, but totally forget about the special intel-packing function.
> The idea I've discussed a bit with Paulo is to have our own wrapper
> function which intel_hdmi_set_spd_infoframe and
> intel_hdmi_set_avi_infoframe can call. The wrapper allocates a new
> temporary buffer in the common layout without the ECC byte, calls the
> common packing function with that temporary bufffer and then copies
> things over into the intel layout. That way we can use the common
> infoframe construction&packing stuff, without running the risk of
> blowing up the dip write functions right away (now that they seem to
> actually work).
So looking at the differences between the standard HDMI infoframe and
the dip infoframe structures, this would mean copying 3 bytes of header,
add a 0 byte, then copying the remaining bytes. I think all of this can
be done much more easily when writing to the hardware.
Maybe it would help to do something similar to what I did on Tegra to
validate that the same infoframe ends up in the registers as for the old
code. I used a #ifdef HDMI_GENERIC to easily switch between both code
paths and added some debug output to the register writes so that I could
compare both at the register level. If we do the same for Intel hardware
we should be able to fix this properly.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-12-07 8:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 16:45 [RFC v2 0/5] Add HDMI infoframe helpers Thierry Reding
2012-12-05 16:45 ` [RFC v2 1/5] drm: Add some missing forward declarations Thierry Reding
2012-12-05 16:45 ` [RFC v2 2/5] video: Add generic HDMI infoframe helpers Thierry Reding
2012-12-07 14:32 ` Paulo Zanoni
2012-12-11 7:58 ` Thierry Reding
2012-12-05 16:45 ` [RFC v2 3/5] drm: Add " Thierry Reding
2012-12-05 17:51 ` Lars-Peter Clausen
2012-12-06 7:28 ` Thierry Reding
2012-12-06 8:28 ` Lars-Peter Clausen
2012-12-06 14:09 ` Daniel Vetter
2012-12-06 14:28 ` Thierry Reding
2012-12-06 15:44 ` Daniel Vetter
2012-12-06 16:02 ` Thierry Reding
2012-12-07 19:00 ` Daniel Vetter
2012-12-05 16:45 ` [RFC v2 4/5] drm: tegra: Use generic " Thierry Reding
2012-12-05 16:45 ` [RFC v2 5/5] drm/i915: " Thierry Reding
2012-12-06 14:16 ` Daniel Vetter
2012-12-06 14:23 ` Thierry Reding
2012-12-06 15:57 ` Daniel Vetter
2012-12-06 16:02 ` Thierry Reding
2012-12-06 16:11 ` Paulo Zanoni
2012-12-06 16:55 ` Paulo Zanoni
2012-12-07 7:28 ` Thierry Reding
2012-12-07 8:30 ` Daniel Vetter
2012-12-07 8:49 ` Thierry Reding [this message]
2012-12-07 7:22 ` Thierry Reding
2012-12-07 15:11 ` [RFC] " Paulo Zanoni
2012-12-07 15:32 ` Daniel Vetter
2012-12-11 10:39 ` Daniel Vetter
2012-12-11 8:35 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121207084912.GA9427@avionic-0098.adnet.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox