From patchwork Fri Aug 14 15:49:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 52447 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 38F172031F for ; Fri, 14 Aug 2015 15:50:13 +0000 (UTC) Received: by labd1 with SMTP id d1sf29127287lab.0 for ; Fri, 14 Aug 2015 08:50:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=r6NDTn4wUeETE/t/ZcZHufw2X7Hvq5gcFY3NfW+W2lQ=; b=MRfmUWqwXjALaQEj3mveKHzMAXMSrs16+KtppltPKrj+y3dB2qqc59Xp90cGKDdntd VcB/qlZw1W5BipmEyrkg35cZrMjkhMiqJn/rgMoSqZR2UKBkxE4aQ+U97GZIRZ/g3j6H H35GTsSAIt75v8xm86M3OpWGJe71dr2ntEGRvJEHfUXUNQt5G7bI5eMGnhJD7uXw+yLJ mRlAGPZQawNGOrX0RG8r1shWtNmOV0x36rccXrmJYzfgK/a9I+AxRIx761LAx+/z1pW6 tST3TE6jDvYsdLbirJqVCeaF90JNbFUC1qfRbLEvaGzaYIGKdRUnb5wy90/FjIG2JG8g AY7w== X-Gm-Message-State: ALoCoQkfUWlsbmuosq9b12ctnP3awyAJXWXfXoNaOe+1uXrNdW3C2PKa2TvLhPBofxKBLqNKdyDA X-Received: by 10.152.1.164 with SMTP id 4mr7068877lan.2.1439567412209; Fri, 14 Aug 2015 08:50:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.131 with SMTP id wq3ls324564lac.106.gmail; Fri, 14 Aug 2015 08:50:12 -0700 (PDT) X-Received: by 10.152.219.172 with SMTP id pp12mr21058751lac.17.1439567412060; Fri, 14 Aug 2015 08:50:12 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id y8si6197826lay.79.2015.08.14.08.50.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 08:50:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lagz9 with SMTP id z9so46239832lag.3 for ; Fri, 14 Aug 2015 08:50:11 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr44413688lbb.36.1439567411474; Fri, 14 Aug 2015 08:50:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1715153lba; Fri, 14 Aug 2015 08:50:10 -0700 (PDT) X-Received: by 10.66.183.164 with SMTP id en4mr76334557pac.24.1439567410190; Fri, 14 Aug 2015 08:50:10 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id br3si9607362pbc.55.2015.08.14.08.50.09; Fri, 14 Aug 2015 08:50:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497AbbHNPuI (ORCPT + 6 others); Fri, 14 Aug 2015 11:50:08 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:37432 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755494AbbHNPuH (ORCPT ); Fri, 14 Aug 2015 11:50:07 -0400 Received: by wibhh20 with SMTP id hh20so25349569wib.0 for ; Fri, 14 Aug 2015 08:50:06 -0700 (PDT) X-Received: by 10.180.97.41 with SMTP id dx9mr8188896wib.34.1439567406522; Fri, 14 Aug 2015 08:50:06 -0700 (PDT) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id ho10sm8778802wjb.39.2015.08.14.08.50.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 08:50:06 -0700 (PDT) From: Srinivas Kandagatla To: Thierry Reding , dri-devel@lists.freedesktop.org Cc: David Airlie , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, robdclark@gmail.com, bjorn@kryo.se, Srinivas Kandagatla Subject: [PATCH RFC 1/5] drm/edid: Add support to get edid early Date: Fri, 14 Aug 2015 16:49:58 +0100 Message-Id: <1439567398-13611-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <439567280-13491-1-git-send-email-srinivas.kandagatla@linaro.org> References: <439567280-13491-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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); +} +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);