All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 1/5] drm/edid: Add support to get edid early
Date: Mon, 17 Aug 2015 10:44:49 +0100	[thread overview]
Message-ID: <55D1AD11.8040602@linaro.org> (raw)
In-Reply-To: <87614epd1g.fsf@intel.com>



On 17/08/15 08:52, Jani Nikula wrote:
> On Fri, 14 Aug 2015, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> wrote:
>> This patch adds support to get edid way early before the connector is
>> created, this is mainly used for panel drivers to auto-probe the panel
>> based on the vendor and product id from EDID.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   drivers/gpu/drm/drm_edid.c | 8 ++++++++
>>   include/drm/drm_crtc.h     | 1 +
>>   2 files changed, 9 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index 7087da3..30359cd 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -1388,6 +1388,14 @@ struct edid *drm_get_edid(struct drm_connector *connector,
>>   }
>>   EXPORT_SYMBOL(drm_get_edid);
>>
>> +struct edid *drm_get_edid_early(struct i2c_adapter *adapter)
>> +{
>> +	struct drm_connector dummy_connector;
>> +
>> +	return drm_get_edid(&dummy_connector, adapter);
>
> This will oops the kernel on bad EDID.
>
Thanks for quick review,

Yes, you are right it would blow up on dev_warn(connector->dev->dev, ...

May we can fix this if we are happy to take this approach of getting 
edid early.

--srini
> BR,
> Jani.
>
>
>> +}
>> +EXPORT_SYMBOL(drm_get_edid_early);
>> +
>>   /**
>>    * drm_edid_duplicate - duplicate an EDID and the extensions
>>    * @edid: EDID to duplicate
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index 57ca8cc..35d8763 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -1330,6 +1330,7 @@ extern void drm_reinit_primary_mode_group(struct drm_device *dev);
>>   extern bool drm_probe_ddc(struct i2c_adapter *adapter);
>>   extern struct edid *drm_get_edid(struct drm_connector *connector,
>>   				 struct i2c_adapter *adapter);
>> +extern struct edid *drm_get_edid_early(struct i2c_adapter *adapter);
>>   extern struct edid *drm_edid_duplicate(const struct edid *edid);
>>   extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
>>   extern void drm_mode_config_init(struct drm_device *dev);
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

  reply	other threads:[~2015-08-17  9:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <439567280-13491-1-git-send-email-srinivas.kandagatla@linaro.org>
2015-08-14 15:49 ` [PATCH RFC 1/5] drm/edid: Add support to get edid early Srinivas Kandagatla
2015-08-17  7:52   ` Jani Nikula
2015-08-17  7:52     ` Jani Nikula
2015-08-17  9:44     ` Srinivas Kandagatla [this message]
2015-08-14 15:50 ` [PATCH RFC 2/5] drm/edid: export edid_vendor() Srinivas Kandagatla
2015-08-14 15:50 ` [PATCH RFC 3/5] drm/panel: simple-panel: Add panel picker support Srinivas Kandagatla
2015-08-14 15:51 ` [PATCH RFC 4/5] drm/msm: mdp4 lvds: continue if the panel is not connected Srinivas Kandagatla
2015-08-14 15:51 ` [PATCH RFC 5/5] drm/msm: mdp4 lvds: Check the panel node in detect_panel() Srinivas Kandagatla

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=55D1AD11.8040602@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.