From patchwork Sun Jul 7 18:19:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11034229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EE27414DB for ; Sun, 7 Jul 2019 18:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB3B427FAC for ; Sun, 7 Jul 2019 18:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB36C2837D; Sun, 7 Jul 2019 18:30:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7664427FAC for ; Sun, 7 Jul 2019 18:30:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2102189B57; Sun, 7 Jul 2019 18:30:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id B71F289B57 for ; Sun, 7 Jul 2019 18:30:00 +0000 (UTC) Received: from pendragon.nordic-sky.finnair.com (unknown [38.98.37.142]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2951DAF9; Sun, 7 Jul 2019 20:29:41 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH 27/60] drm/omap: Simplify HDMI mode and infoframe configuration Date: Sun, 7 Jul 2019 21:19:04 +0300 Message-Id: <20190707181937.6250-24-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190707181937.6250-1-laurent.pinchart@ideasonboard.com> References: <20190707180852.5512-1-laurent.pinchart@ideasonboard.com> <20190707181937.6250-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562524199; bh=JH8l1FyuKPeIev3dyU6RP0X2aylZf8gmn1Had+NigWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RMtsqy8oJldq83YqPwh979bA9l+lJ44lfVlIafoWhlRqcpWF2XBtd7SqCUStmkUKc JyFlQrKH8hNDlHfvx0OK6bXzLJQ5qgt9y7u0ETDbDDpiSiwBTCPnYvIvWkfDQVSF2w 8KPKyA/6FEXF5R525n1nRrJREpvZf/YDTl1RrbTE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Sebastian Reichel , Tomi Valkeinen , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove the omap_connector_get_hdmi_mode() function as the HDMI mode can be accessed directly from the connector's display info. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_connector.c | 11 ----------- drivers/gpu/drm/omapdrm/omap_connector.h | 1 - drivers/gpu/drm/omapdrm/omap_encoder.c | 4 +--- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index 5967283934e1..a59cca2883b1 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -32,7 +32,6 @@ struct omap_connector { struct drm_connector base; struct omap_dss_device *output; struct omap_dss_device *hpd; - bool hdmi_mode; }; static void omap_connector_hpd_notify(struct drm_connector *connector, @@ -95,13 +94,6 @@ void omap_connector_disable_hpd(struct drm_connector *connector) hpd->ops->unregister_hpd_cb(hpd); } -bool omap_connector_get_hdmi_mode(struct drm_connector *connector) -{ - struct omap_connector *omap_connector = to_omap_connector(connector); - - return omap_connector->hdmi_mode; -} - static struct omap_dss_device * omap_connector_find_device(struct drm_connector *connector, enum omap_dss_device_ops_flag op) @@ -178,7 +170,6 @@ static void omap_connector_destroy(struct drm_connector *connector) static int omap_connector_get_modes_edid(struct drm_connector *connector, struct omap_dss_device *dssdev) { - struct omap_connector *omap_connector = to_omap_connector(connector); enum drm_connector_status status; void *edid; int n; @@ -200,8 +191,6 @@ static int omap_connector_get_modes_edid(struct drm_connector *connector, drm_connector_update_edid_property(connector, edid); n = drm_add_edid_modes(connector, edid); - omap_connector->hdmi_mode = drm_detect_hdmi_monitor(edid); - kfree(edid); return n; diff --git a/drivers/gpu/drm/omapdrm/omap_connector.h b/drivers/gpu/drm/omapdrm/omap_connector.h index 608085219336..a23b3a80657b 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.h +++ b/drivers/gpu/drm/omapdrm/omap_connector.h @@ -32,7 +32,6 @@ struct omap_dss_device; struct drm_connector *omap_connector_init(struct drm_device *dev, struct omap_dss_device *output, struct drm_encoder *encoder); -bool omap_connector_get_hdmi_mode(struct drm_connector *connector); void omap_connector_enable_hpd(struct drm_connector *connector); void omap_connector_disable_hpd(struct drm_connector *connector); enum drm_mode_status omap_connector_mode_fixup(struct omap_dss_device *dssdev, diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c index 40512419642b..8cae2af1438f 100644 --- a/drivers/gpu/drm/omapdrm/omap_encoder.c +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c @@ -86,9 +86,7 @@ static void omap_encoder_hdmi_mode_set(struct drm_connector *connector, { struct omap_encoder *omap_encoder = to_omap_encoder(encoder); struct omap_dss_device *dssdev = omap_encoder->output; - bool hdmi_mode; - - hdmi_mode = omap_connector_get_hdmi_mode(connector); + bool hdmi_mode = connector->display_info.is_hdmi; if (dssdev->ops->hdmi.set_hdmi_mode) dssdev->ops->hdmi.set_hdmi_mode(dssdev, hdmi_mode);