From patchwork Fri Mar 8 18:37:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 10845301 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 489F51515 for ; Fri, 8 Mar 2019 18:37:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30AF92FDA3 for ; Fri, 8 Mar 2019 18:37:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23FB22FDB7; Fri, 8 Mar 2019 18:37:43 +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,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C96F22FDA3 for ; Fri, 8 Mar 2019 18:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=N8mt8YR9cTo5yRwI6LsuCnmqUEkCjk9aWVm7U7gf3eg=; b=mRi FAb3nrE9l+f95T/vob+WKR8bsTXURuyP0DUFuvPQMCndn3qjdwDw13VmD2YnnjJimU+176/QeXTh5 bkv7r722Ij3qjrBvIv7+OMVe9MjaGr9RoihRWsQsJg7Ibn70vbGXZYgVUHw50RThUvHhPN8UpCVIG Qhl8UonK8NhTnx+j/TpaRIaCh8V0AypDCdPdr0L83Bu6LmPfl6x2d6/2C+BfUMMr95vV1Yydn9hzk g1m5oT9qzQ1uCq/haEZ6yy8pmoIeL1HB2pviWPjaVaSHoT+wKAUmgNjdUsSPsi0tcNH/iUnQq6MqI IOfL6L2z2opeDG4XcuZ0lqKk8y5OMtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2KND-0001xE-Bu; Fri, 08 Mar 2019 18:37:35 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2KNA-0001wB-DQ; Fri, 08 Mar 2019 18:37:33 +0000 Received: by mail-ed1-x542.google.com with SMTP id o25so26536edv.0; Fri, 08 Mar 2019 10:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qm0FJBZB2BvYmG2ziqGd4FN9RTC6OY7BmwU6Jdqsji4=; b=AaFvHIj83NcgPFjiBlABx9n6l5QhinKxrDCmEYkeBFixi/hN/cB9ib9SiX5h7CQeNr DFNHh4xInut7dcLL+cAk8kSy1Zhd3TxhoxqhMmEMWyzPh8O5GbvjryuzyxJZefBDq2ZE xnGssxXQNal2CdAcm9RxXaM9ooaLjA3kIBhvZYZdUF3l2akjXkwpLx625yHvYKQe+66I nXpQ+VkH3RqHk8PYlUW382yjZvHLxGzEvquJHGdeJoOADP15/8OODUfB36M+KVm0aw6R cmbVmDtF3lgVARe0JRpLZ6DiMrYrt633I1xsqOu5Q7bzOF1jjdU2VDuonhnUZto//SsN JLaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qm0FJBZB2BvYmG2ziqGd4FN9RTC6OY7BmwU6Jdqsji4=; b=pJatj0L6WNjVDbpQ7yRdF2krgGfscXKy4CMdpy0sC4f4PCwT0yecE9yfdrWawuJkUg sklh6uho/iANKs4f6vAPBVX+WkWmD1FVzeMHg/jHRAcXHd+SJQXydJrXLwjM/HxcRjJd GNyThglucra4Uv162ow+DV3m7aaSGVAbOSjEVD5OIau+RqmES5Vi6wbUbL4MCSRJVgmd av2CrgjCd7XKKoiEpbCML9gGVUk3dk/Krrk4jWq8h3UWyItR11tF0/Bc0l/4auyPhcug RWEcj91FA7AeNhSqB5vb4VAm67tgDXcb9X3o/prw8pDVrSGsy62XBbxhUiJpBdac7UTj 66+g== X-Gm-Message-State: APjAAAXJ+SWWH35r04o1yRMKmuUBB7KfxNqR7j+7bBktyP834KB1qbF8 dkiBOj0DGKm9vnuSO4GIsITYffXK X-Google-Smtp-Source: APXvYqya0HfUb66/MLKHKe2lNPO6yxEpw2AWqUF5EV6GVp5/hLuVCg0CoITfKnBcYrZTWwFfeAjiyw== X-Received: by 2002:a50:d508:: with SMTP id u8mr34174554edi.51.1552070250112; Fri, 08 Mar 2019 10:37:30 -0800 (PST) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id s6sm2359132eda.90.2019.03.08.10.37.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2019 10:37:29 -0800 (PST) From: Johan Jonker To: heiko@sntech.de Subject: [PATCH] drm: rockchip: add shutdown function to poweroff VOP and HDMI TX Date: Fri, 8 Mar 2019 19:37:18 +0100 Message-Id: <20190308183718.21409-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190308_103732_476449_E1E4D565 X-CRM114-Status: GOOD ( 11.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, daniel@ffwll.ch, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When a MK808 TV-stick with RK3066 processor is given a poweroff command, the monitor doesn't turn blank, but freezes. The VOP and HDMI share the same power domain, so that means that both there clocks were never turned off. Fix the disable of the VOP and HDMI TX by adding an extra shutdown function that will unbind both drivers. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 8d7a634c1..66a8e99a3 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -448,6 +448,13 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev) return 0; } +static void rockchip_drm_platform_shutdown(struct platform_device *pdev) +{ + component_master_del(&pdev->dev, &rockchip_drm_ops); + + rockchip_drm_match_remove(&pdev->dev); +} + static const struct of_device_id rockchip_drm_dt_ids[] = { { .compatible = "rockchip,display-subsystem", }, { /* sentinel */ }, @@ -457,6 +464,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids); static struct platform_driver rockchip_drm_platform_driver = { .probe = rockchip_drm_platform_probe, .remove = rockchip_drm_platform_remove, + .shutdown = rockchip_drm_platform_shutdown, .driver = { .name = "rockchip-drm", .of_match_table = rockchip_drm_dt_ids,