From patchwork Sat Apr 14 11:52:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathyush X-Patchwork-Id: 7872 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EFDA223E49 for ; Mon, 16 Apr 2012 15:39:28 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id BAA8BA186AE for ; Mon, 16 Apr 2012 15:39:28 +0000 (UTC) Received: by mail-gy0-f180.google.com with SMTP id z12so3077966ghb.11 for ; Mon, 16 Apr 2012 08:39:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:x-mailman-approved-at:cc:subject :x-beenthere:x-mailman-version:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-gm-message-state; bh=iuc0YcLLMKrNvb12sMJzzja83DbA2AVSRwmnDFmHBP4=; b=T675M/PtLlnTQTxFfnhd7Kp/TtoMK3ihBNg8hsScLGwMD7XYj+lPudy/SGPDstPihE +98ZwXnoYScMpLXmXDYe1raSC1He6imPx93GFjtEgmZZ3d5ec5SauDOhqEMEw8IyKk59 LOvM/LscCggHa/ghGq1TB4EafuYDywdOUwuL0iNFebciTPAEcfCoqzzdmk7cejyp5mVi uH+/lLQsBBw7fkVjLOCUcg/J3FHW8kvCFQBY6rbQBL317qhHCb+mQoMP0t8sENGdVG2t 0xOWyEm5Nu0MovxgCz+8w9CABCXcpnXCGhrIJHZwIJlLKQdsBln2CoURc/9fOpIxLRY4 4fYA== Received: by 10.50.194.163 with SMTP id hx3mr6254008igc.49.1334590768089; Mon, 16 Apr 2012 08:39:28 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp84609ibt; Mon, 16 Apr 2012 08:39:27 -0700 (PDT) Received: by 10.180.102.129 with SMTP id fo1mr19839521wib.6.1334590766522; Mon, 16 Apr 2012 08:39:26 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id n6si10192954wee.59.2012.04.16.08.39.25; Mon, 16 Apr 2012 08:39:26 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SJo1S-0002Og-4w; Mon, 16 Apr 2012 15:39:22 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SJ1Hn-0007BF-Hu for linaro-mm-sig@lists.linaro.org; Sat, 14 Apr 2012 11:36:59 +0000 Received: from epcpsbgm1.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0M2G0074HW9H2760@mailout4.samsung.com> for linaro-mm-sig@lists.linaro.org; Sat, 14 Apr 2012 20:36:58 +0900 (KST) X-AuditID: cbfee61a-b7c51ae000004a99-e1-4f8961593be7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id 0D.90.19097.951698F4; Sat, 14 Apr 2012 20:36:58 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0M2G00CFAW941S00@mmp2.samsung.com> for linaro-mm-sig@lists.linaro.org; Sat, 14 Apr 2012 20:36:57 +0900 (KST) From: Prathyush To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Date: Sat, 14 Apr 2012 17:22:12 +0530 Message-id: <1334404333-24592-4-git-send-email-prathyush.k@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1334404333-24592-1-git-send-email-prathyush.k@samsung.com> References: <1334404333-24592-1-git-send-email-prathyush.k@samsung.com> X-Brightmail-Tracker: AAAAAA== X-TM-AS-MML: No X-Mailman-Approved-At: Mon, 16 Apr 2012 15:39:19 +0000 Cc: inki.dae@samsung.com, sunilm@samsung.com, subash.rp@samsung.com, prashanth.g@samsung.com, prathyush.k@samsung.com Subject: [Linaro-mm-sig] [PATCH 3/4] [RFC] drm/Exynos: Added 'disable' function to Exynos drm crtc module. X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQmHojxAIzzNsRGyi4TzunUW89ld0aedBeFHI/USocr3g11hosp9Ev6btYK06F2VlERrpioX While freeing an fb, if the fb is being used by a crtc, the drm driver tries to disable the CRTC. Currently there is no disable function provided by exynos drm crtc module so the driver tries to suspend the crtc (by calling dpms) which only works if RUNTIME PM is enabled. Signed-off-by: Prathyush K --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index e3861ac..eb1e553 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -192,6 +192,16 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode) mutex_unlock(&dev->struct_mutex); } +static void exynos_drm_crtc_disable(struct drm_crtc *crtc) +{ + struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + struct exynos_drm_overlay *overlay = &exynos_crtc->overlay; + int win = overlay->zpos; + + exynos_drm_fn_encoder(crtc, &win, + exynos_drm_encoder_crtc_disable); +} + static void exynos_drm_crtc_prepare(struct drm_crtc *crtc) { DRM_DEBUG_KMS("%s\n", __FILE__); @@ -278,6 +288,7 @@ static void exynos_drm_crtc_load_lut(struct drm_crtc *crtc) static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { .dpms = exynos_drm_crtc_dpms, + .disable = exynos_drm_crtc_disable, .prepare = exynos_drm_crtc_prepare, .commit = exynos_drm_crtc_commit, .mode_fixup = exynos_drm_crtc_mode_fixup,