Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932943AbdGXRd7 (ORCPT ); Mon, 24 Jul 2017 13:33:59 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59008 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932874AbdGXRdm (ORCPT ); Mon, 24 Jul 2017 13:33:42 -0400 From: Sebastian Reichel To: Sebastian Reichel , Tomi Valkeinen , Tony Lindgren Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel Subject: [PATCHv1 07/14] drm/omap: add support for physical size hints from display drivers Date: Mon, 24 Jul 2017 19:33:04 +0200 Message-Id: <20170724173311.27170-8-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170724173311.27170-1-sebastian.reichel@collabora.co.uk> References: <20170724173311.27170-1-sebastian.reichel@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1521 Lines: 42 While physical size information is automatically parsed for EDID based displays, we need to provide it manually for displays providing one fixed mode. Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 ++ drivers/gpu/drm/omapdrm/omap_connector.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 4e619ff360ae..530365e9c48d 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -560,6 +560,8 @@ struct omap_dss_driver { struct videomode *vm); void (*get_timings)(struct omap_dss_device *dssdev, struct videomode *vm); + void (*get_size)(struct omap_dss_device *dssdev, + unsigned int *width, unsigned int *height); int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); u32 (*get_wss)(struct omap_dss_device *dssdev); diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index 5e941305ab1b..b2678105aaf2 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -136,6 +136,12 @@ static int omap_connector_get_modes(struct drm_connector *connector) drm_mode_set_name(mode); drm_mode_probed_add(connector, mode); + if (dssdrv->get_size) { + dssdrv->get_size(dssdev, + &connector->display_info.width_mm, + &connector->display_info.height_mm); + } + n = 1; } -- 2.13.2