public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Shobhit Kumar <shobhit.kumar@intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: Update VBT data structures to have MIPI block enhancements
Date: Thu, 13 Feb 2014 10:33:11 +0200	[thread overview]
Message-ID: <87mwhvxvi0.fsf@intel.com> (raw)
In-Reply-To: <52FC8041.6000002@intel.com>

On Thu, 13 Feb 2014, Shobhit Kumar <shobhit.kumar@intel.com> wrote:
> Hi
>
> On Thursday 13 February 2014 12:47 PM, Jani Nikula wrote:
>> On Thu, 13 Feb 2014, Shobhit Kumar <shobhit.kumar@intel.com> wrote:
>> Per the spec you sent me, there's 1 byte reserved, and 5 bytes of GPIO
>> indexes below.
>>
>> All in all, the size of the struct is different from the spec, shifting
>> everything for panel_type > 0. Which one is wrong?
>
> Take that the code is correct and the spec wrong. What I sent still 
> might be a little old, but the code is matched with header files used in 
> GOP code precisely for this reason that spec is not always updated 
> immediately.

:(

>>
>>> +
>>> +	/* GPIOs */
>>> +	u8 panel_enable;
>>> +	u8 bl_enable;
>>> +	u8 pwm_enable;
>>> +	u8 reset_r_n;
>>> +	u8 pwr_down_r;
>>> +	u8 stdby_r_n;
>>> +
>>>   } __packed;
>>
>> All around I would like it if the field names were slightly more
>> descriptive by themselves, particularly for the most important ones,
>> with #defines for the values in some cases. For example panel_type above
>> could clearly be "is_bridge" or similar (now it's confusing with the
>> panel_type in intel_bios.c). Same for any booleans that could be
>> expressed as "is_something" or "something_enabled". Color formats and
>> rotations could have defines, so you wouldn't need to add comments for
>> them at all. Same for byte_clk_sel.
>
> I just tried to match the names used in the VBT interface document as 
> such. But we can make some of them more descriptive. Its only that while 
> discussing parameters with those who talk in VBT document terms, it 
> helps to be on same page

There's certain value in that. The flip side of the coin is that not
everyone will have the spec handy when reading the code.

An alternative to changing the field names is adding #defines for at
least the most important ones. In this case it might be a good idea to
add the #defines within the struct, next to the relevant field.

>> I definitely do *not* mean you should rewrite all of them. If you want,
>> I can reply with detailed suggestions on a per field basis.
>>
>
> I can give a shot at improving some of them. If after that you still 
> feel changes are needed, you can suggest.

Ack. Again: fine tuning, not rewrite. :)


Thanks,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2014-02-13  8:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  6:27 [PATCH 0/2] Support for new MIPI Blocks in VBT Shobhit Kumar
2014-02-13  6:27 ` [PATCH 1/2] drm/i915: Update VBT data structures to have MIPI block enhancements Shobhit Kumar
2014-02-13  7:17   ` Jani Nikula
2014-02-13  8:20     ` Shobhit Kumar
2014-02-13  8:33       ` Jani Nikula [this message]
2014-02-13 14:41   ` Jani Nikula
2014-02-13  6:27 ` [PATCH 2/2] drm/i915: Add parsing support for new MIPI blocks in VBT Shobhit Kumar
2014-02-13 14:58   ` Jani Nikula

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=87mwhvxvi0.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shobhit.kumar@intel.com \
    /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