Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp559694ybt; Wed, 1 Jul 2020 05:05:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6ZJFRzF+ZN6/Mqxg9896jJNukVcXLOYeiDp1Qkknitgk/34W3cB7848a10Tk2aeQ1wRKe X-Received: by 2002:a17:907:10d4:: with SMTP id rv20mr7047333ejb.413.1593605126721; Wed, 01 Jul 2020 05:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593605126; cv=none; d=google.com; s=arc-20160816; b=PSTAT9nww6NJH2b6Mtlk3ucpXZi8Tw+QeWizX1nLxIAAAggVRC1OsRPNNZprHvmotu 7EC/J5aCjcMK4dPodFIj8b3iid+CCN8Rl7W1gZfoWa9qg4Ev1zy3xPPNu6nV2NATShJ+ kTcSbJQq5p7877T/7bP+0AK2ATLPysq0FpW8Q98TpG9NzsfwV5DDVTn5mo0Reyb+iXyF Q9GNxjMaeLxY2Bijmgnl3nQIyZOA1H9B4czVL39HnWOYI9HHIgVUXgo0kOaxMgRlJKNO tfJJxxjOza7oQUQf2/6D8gw4224Z5MkSkCPUOV3HA7vjgnBSAOjyPkTE+bvZE9x016pY Gkzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature; bh=Ljx3jsZZFIQ7xSm8ZJvSzuKpK0meAfEeFxtF2zZEFYc=; b=VdMUF4Z3uSPE54DMKRv8aj9mkKFOFQJfXh8+NyULe2NF+o1OrrXHhrrvM1GPRFArbD GJyODRotckHpjYadV1jVnkPHNrtzmC8QNAz3dBlGoWueUXsk7QnyDzfVvpwR2IbpOjup 3s0JDzaZum+hRxlen+beyVMM0iRT8OGO8aiOqko61EyPNOOUIFduIQuKTUS+csct9MEI Wxm0qUwGckiImm5ld+QQGsO8otLLGff4JRUFRNZ599UVidhNejg+lc50pSPn2/rZlPQ4 t1Hbqi9/y63F8GYoBetXZWBMRVJLVrtX1xsireM1HiRv83Zyrt1K/MwrbiUPwxdnmKHu i7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=fb7cuRhL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si3435218edv.611.2020.07.01.05.05.02; Wed, 01 Jul 2020 05:05:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=fb7cuRhL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730241AbgGAMEU (ORCPT + 99 others); Wed, 1 Jul 2020 08:04:20 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:48742 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730103AbgGAMEU (ORCPT ); Wed, 1 Jul 2020 08:04:20 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 061BsUri021383; Wed, 1 Jul 2020 14:04:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=Ljx3jsZZFIQ7xSm8ZJvSzuKpK0meAfEeFxtF2zZEFYc=; b=fb7cuRhLxGzcX8nKWbKjpT7OfnBxp+qNk7oCqA/ls3qEgUKwWWFqJvftpNRJNQ36k9dm 76X4hOkHhyMKsvcaTfXqwcYlRxmjwqpXv2+9hcVrVNrcMw4plpoIthjokrHSozxqDNtB qKEVWde2MeJjGX4Vx9lVGmmJYXHxfaDtZlb7Ihss/6Qg5G8hA769U3rjli3oKjwfUiaZ 2oR9PaLMR0+MDrPZbFIkuE9NPNoHF8ovdXf98HeX2tclZ2Ppo0Q4SF80YrSYJkSrAhuE 9O2CK8Wqcpj/dGlbWYApLDibhJtQofNa3eSB/N12B+i5U1YXGy0+jLXhhf+YLzEKrvtC WA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 31ww0g9sx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 14:04:07 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 605A810002A; Wed, 1 Jul 2020 14:04:06 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 43F922B2CE5; Wed, 1 Jul 2020 14:04:06 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 1 Jul 2020 14:04:05 +0200 From: Yannick Fertre To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] drm/stm: ltdc: remove call of pm-runtime functions Date: Wed, 1 Jul 2020 14:04:02 +0200 Message-ID: <20200701120402.6444-1-yannick.fertre@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG5NODE1.st.com (10.75.127.13) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-01_07:2020-07-01,2020-07-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is not necessary to suspend or stop the ltdc clocks to modify the pixel clock. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/stm/ltdc.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 3f590d916e91..6e28f707092f 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -506,15 +506,7 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc, struct drm_display_mode *adjusted_mode) { struct ltdc_device *ldev = crtc_to_ltdc(crtc); - struct drm_device *ddev = crtc->dev; int rate = mode->clock * 1000; - bool runtime_active; - int ret; - - runtime_active = pm_runtime_active(ddev->dev); - - if (runtime_active) - pm_runtime_put_sync(ddev->dev); if (clk_set_rate(ldev->pixel_clk, rate) < 0) { DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate); @@ -523,14 +515,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc, adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000; - if (runtime_active) { - ret = pm_runtime_get_sync(ddev->dev); - if (ret) { - DRM_ERROR("Failed to fixup mode, cannot get sync\n"); - return false; - } - } - DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n", mode->clock, adjusted_mode->clock); -- 2.17.1