From patchwork Fri Mar 24 14:27:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 95956 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp76398obz; Fri, 24 Mar 2017 07:27:43 -0700 (PDT) X-Received: by 10.98.155.28 with SMTP id r28mr9413743pfd.212.1490365663664; Fri, 24 Mar 2017 07:27:43 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 31si3079991pli.135.2017.03.24.07.27.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 07:27:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD7BD6EBF0; Fri, 24 Mar 2017 14:27:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D5896EC03 for ; Fri, 24 Mar 2017 14:27:40 +0000 (UTC) Received: from e110455-lin.cambridge.arm.com (e110455-lin.cambridge.arm.com [10.2.131.175]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v2OERaAe011457; Fri, 24 Mar 2017 14:27:36 GMT From: Liviu Dudau To: Brian Starkey Subject: [PATCH] drm: mali-dp: Enable power management for the device. Date: Fri, 24 Mar 2017 14:27:36 +0000 Message-Id: <20170324142736.32006-1-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.12.0 Cc: LAKML , Daniel Vetter , Mali DP Maintainers , LKML , DRI devel 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" Enable runtime and system Power Management. Clocks are now managed from malidp_crtc_{enable,disable} functions. Suspend-to-RAM tested as working on Juno. Signed-off-by: Liviu Dudau Reviewed-by: Brian Starkey --- drivers/gpu/drm/arm/malidp_crtc.c | 14 ++++- drivers/gpu/drm/arm/malidp_drv.c | 128 +++++++++++++++++++++++++++++++------- drivers/gpu/drm/arm/malidp_drv.h | 1 + drivers/gpu/drm/arm/malidp_hw.h | 5 ++ 4 files changed, 125 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c index f9d665550d3e..fab776c37602 100644 --- a/drivers/gpu/drm/arm/malidp_crtc.c +++ b/drivers/gpu/drm/arm/malidp_crtc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include