From patchwork Fri Sep 23 14:06:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9348187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6F41C607F2 for ; Fri, 23 Sep 2016 14:07:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 604D32AB7E for ; Fri, 23 Sep 2016 14:07:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5523D2AB94; Fri, 23 Sep 2016 14:07:21 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 DD5C02AB7E for ; Fri, 23 Sep 2016 14:07:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F84C6E054; Fri, 23 Sep 2016 14:07:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1A2C6E054 for ; Fri, 23 Sep 2016 14:07:14 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id b184so2999484wma.3 for ; Fri, 23 Sep 2016 07:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=zaKQpk4IoUEiEX7SHDHJADN44lhmTm1Px040GFqQoTM=; b=WLrclOvAKqHc5xDsK+owwZBpeJMgorP0K3OwmxnjaFov4QDE36oUDMF35GsgsRAo6x TshtAo6Q0sV63inDK4MPEd2NWqGb+dGHtYHtbx0RzRZ3sc5HuIcv0/8fNi7K+R6hiagU fL6BS9msxmuD6vuxFuvR9+0RiI0e1tyuq4zIWRe0rBHLyBADkQAyzxghcO5v/Pd6O3u6 Hk/yJDSE0M14mFZNWkqn6VijsS6tSeQ8PMWsywl2e7hddcjXN7F0HtRRgkrJLdlkwnyA oVn/2ERKOdbz9gb8U4Ars9/uA9awdQORd4amjMN+l1l38TktGmeqrQVuL1EIvkJ7Bdra HHIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=zaKQpk4IoUEiEX7SHDHJADN44lhmTm1Px040GFqQoTM=; b=W1KEHbL537FkXb/Q73VEeMIPok7ekOv3CPQbfWnRAq/gQIwv2heGnBqn6w9Me+GqKC maYZl0aT2VPW9/kmh2NZTCcJgieA6fOL8f5JQJcrAU/HjoZSwEi/eRi6tX4c1mDHUG3n 4Vct+28CNyGheghgQiCm+LeD0aUROP5AxOAW7hZWq5m7NCf+HawoCgf0xHleLmQerEYz IzvnCGbiEJ0B1RqeiwouIXtnomt0MoyvN4sNGPIJIAEWPgmQ11oKUSkwaT1gVEnJJawx Y+gkuhvVDB01v7nW1V4kExYie7RblliKd0AF5gSThX6AYRyjIdu+kB5yGuJJlej46tN8 nrMQ== X-Gm-Message-State: AA6/9Rn4A5OrwGbPmygUlJGqltxIgj2jrqQX5M5CwRjV+L6YBgjG/30KjHoYNpChsIjHzA== X-Received: by 10.28.155.212 with SMTP id d203mr3139936wme.103.1474639633591; Fri, 23 Sep 2016 07:07:13 -0700 (PDT) Received: from cizrna.lan ([109.72.12.156]) by smtp.gmail.com with ESMTPSA id ya1sm7443117wjb.23.2016.09.23.07.07.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Sep 2016 07:07:12 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/bridge: analogix_dp: Add analogix_dp_psr_supported Date: Fri, 23 Sep 2016 16:06:39 +0200 Message-Id: <1474639600-30090-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.7.4 Cc: Tomeu Vizoso , dri-devel@lists.freedesktop.org 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-Virus-Scanned: ClamAV using ClamSMTP So users know whether PSR should be enabled or not. Signed-off-by: Tomeu Vizoso Cc: Sean Paul Cc: Yakir Yang Cc: Archit Taneja Reviewed-by: Sean Paul --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++++++++ include/drm/bridge/analogix_dp.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index bf992460a6c7..91d8540ac8f0 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -98,6 +98,14 @@ static int analogix_dp_detect_hpd(struct analogix_dp_device *dp) return 0; } +int analogix_dp_psr_supported(struct device *dev) +{ + struct analogix_dp_device *dp = dev_get_drvdata(dev); + + return dp->psr_support; +} +EXPORT_SYMBOL_GPL(analogix_dp_psr_supported); + int analogix_dp_enable_psr(struct device *dev) { struct analogix_dp_device *dp = dev_get_drvdata(dev); diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index 5f498ca07eea..c99d6eaef1ac 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -38,6 +38,7 @@ struct analogix_dp_plat_data { struct drm_connector *); }; +int analogix_dp_psr_supported(struct device *dev); int analogix_dp_enable_psr(struct device *dev); int analogix_dp_disable_psr(struct device *dev);