From patchwork Wed Jan 9 19:12:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1958541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 12A56DF264 for ; Thu, 10 Jan 2013 07:22:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4170E606B for ; Wed, 9 Jan 2013 23:22:01 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 374 seconds by postgrey-1.32 at gabe; Wed, 09 Jan 2013 11:18:19 PST Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by gabe.freedesktop.org (Postfix) with ESMTP id 000FCE6A7A for ; Wed, 9 Jan 2013 11:18:19 -0800 (PST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3YhKhf6Rx2z4KK2B; Wed, 9 Jan 2013 20:12:02 +0100 (CET) X-Auth-Info: CJ+L6zi5wdsWjR9JGNVMEvwQUmhrR2UboSJ0vQG9Ae0= Received: from mashiro.localnet (unknown [195.140.253.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTPSA id 3YhKhf5MBgzbbgn; Wed, 9 Jan 2013 20:12:02 +0100 (CET) From: Marek Vasut To: Steffen Trumtrar Subject: Re: [PATCHv16 0/7] of: add display helper Date: Wed, 9 Jan 2013 20:12:01 +0100 User-Agent: KMail/1.13.7 (Linux/3.6-trunk-amd64; KDE/4.8.4; x86_64; ; ) References: <1355850256-16135-1-git-send-email-s.trumtrar@pengutronix.de> In-Reply-To: <1355850256-16135-1-git-send-email-s.trumtrar@pengutronix.de> MIME-Version: 1.0 Message-Id: <201301092012.01985.marex@denx.de> X-Mailman-Approved-At: Wed, 09 Jan 2013 22:54:31 -0800 Cc: linux-fbdev@vger.kernel.org, Stephen Warren , devicetree-discuss@lists.ozlabs.org, Florian Tobias Schandinat , dri-devel@lists.freedesktop.org, Tomi Valkeinen , Rob Herring , Laurent Pinchart , kernel@pengutronix.de, Guennady Liakhovetski , linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Dear Steffen Trumtrar, > Hi! > > Finally, right in time before the end of the world on friday, v16 of the > display helpers. I tested this on 3.8-rc1 (next 20130103) with the imx drm driver. After adding the following piece of code (quick hack), this works just fine. Thanks! if (imxpd->edid) { @@ -72,6 +73,15 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) num_modes++; } + if (np) { + struct drm_display_mode *mode = drm_mode_create(connector->dev); + of_get_drm_display_mode(np, &imxpd->mode, 0); + drm_mode_copy(mode, &imxpd->mode); + mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, + drm_mode_probed_add(connector, mode); + num_modes++; + } + return num_modes; } Best regards, Marek Vasut diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx- drm/parallel-display.c index a8064fc..e45002a 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -57,6 +57,7 @@ static void imx_pd_connector_destroy(struct drm_connector *connector) static int imx_pd_connector_get_modes(struct drm_connector *connector) { struct imx_parallel_display *imxpd = con_to_imxpd(connector); + struct device_node *np = imxpd->dev->of_node; int num_modes = 0;