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: 7022731 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 40ADAC05AD for ; Mon, 17 Aug 2015 00:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6ED422063B for ; Mon, 17 Aug 2015 00:51:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 92C7020640 for ; Mon, 17 Aug 2015 00:51:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EAB86E7D3; Sun, 16 Aug 2015 17:51:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEBE56EFB7 for ; Fri, 14 Aug 2015 08:50:07 -0700 (PDT) Received: by wibhh20 with SMTP id hh20so25349570wib.0 for ; Fri, 14 Aug 2015 08:50:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aFjjnNhkkopZ+BHxLmi/xowh/EzSZO5Xn4+JcHJ+FNU=; b=X8fe0bSL+LFTnZ7AcVe/e7ElNGV8tqVwq0spy7q6K6iCW0B4naUOq7Rt77wUX6Jgi+ cfjt9O6KAZMkO2b4dORJO8O/q/PwEfvE9tnTwotejl6Ctdghjcb0n6PKnzuDcROU+HGy idOHviwWunDw9NwRhGKtX88UtYzyEjh1lj+RRjT9mfE13Wtv+yjMKaXRSRTwsUexpkL1 BZRB7XsRuaFE8GhUyOHSQB9eRuIWz5kTSM983ZzCcNpNHc7UXUi7KHkiVIEi5ks4qKTt TFuwB1d1wh6fSshUQOOg3/BTRKk/SK0ziEl88ODBcNTS5OvEUej670m5WoE3L34lYMhs +VYQ== X-Gm-Message-State: ALoCoQm4CyqDve0Nvs5O1nGoFt54TvhHy3MZgv/vZC4KBPNI7BxctPOjqAhT0Aqv1RQ7HTqdr0UV 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 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> X-Mailman-Approved-At: Sun, 16 Aug 2015 17:51:43 -0700 Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);