Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1998137imn; Mon, 1 Aug 2022 07:35:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vr4WQp/q8HufrnW3KjNydQHl0rqTtrWlh8Q6VF1s02U+y9Hj+rx1agHdoGqb1oJdGBflXg X-Received: by 2002:a05:6402:4cc:b0:43c:cd5c:dcfb with SMTP id n12-20020a05640204cc00b0043ccd5cdcfbmr15601019edw.277.1659364558938; Mon, 01 Aug 2022 07:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659364558; cv=none; d=google.com; s=arc-20160816; b=R2KkH6suLnFAM+nhmCvixLw5mH7Z/K/R+6M6Ao5GfL2eB2mNV1Ef9Ea0+JG1GFjRf6 +x0URcYCHznCMXbCXYl17w63UqUCWgNmsbcgmv7R6xEPIydbKXZUEMkq/GZpvotllJEk ia+UZ1l5bfnVGtKUl8nG3tVKYucP6F7MJyhAqRdOqa5p4jdlqjDnBBrXY6z6DGAVXM/g gqwQWUaCvuSoLARaBSdBi8HB+5jpw++kC8vHm2NKaX7ey+RBckL9lF8JyZSaX7ih1ubd FXnGWHMa7ob6ajmJau+RMC0V1xkw6xawhIrTwW+JejM0tggpB9xHOLv0gRwhqjyCmusQ dkNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NkCrMrpG7PAAemzFvj7zQriC7ibq+uDZy/7liQTcrfA=; b=AwU1sHuy4SsJYmVlaHxlTkEi5gERFsAXqXkYYMRXUQEJKxpGQZesqOia6v+bocO6xT RRmFD0jdWsszmgF8C5/Sa87wSy43pqnMI9dWWK9viyu7YOlXTvSkVucR+6xgg/gX2cqB I1rLTOaVh13jc0kXdo01JBjVmBXDDt6x6KVJyFtZS59FsLnNt8D7AKBql+3dd7SN9nP7 pM+z8HfYlc1zz9KOAGIfK1TbjiCO3qEG2oh2CbxSDzlmF+afVpgSygNK5GU4ZigSzhLV xgKAYL8NzDPeO7n2W7RyNtRyRg3eWBxsK1kt0rQtmcb7pj0UzCRhIWVKyHU03niaacLH 1R2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=FC+xKTQY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs18-20020a170906dc9200b0072fc5a78f82si3313852ejc.202.2022.08.01.07.35.33; Mon, 01 Aug 2022 07:35:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=FC+xKTQY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbiHAOc6 (ORCPT + 99 others); Mon, 1 Aug 2022 10:32:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbiHAOcz (ORCPT ); Mon, 1 Aug 2022 10:32:55 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8034A1EEF2; Mon, 1 Aug 2022 07:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1659364374; x=1690900374; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=NkCrMrpG7PAAemzFvj7zQriC7ibq+uDZy/7liQTcrfA=; b=FC+xKTQYetVUG3hqKkTZ/U4Kh450qG4wnHV4jcEuJLbcM2w+d/vo3JSP ETSBQXui4bE1hzXl2K6vCYWM6nWFVOeywk4hL7xdmsRd2nln5C4Ykqf8b sjhyPMkoTR9ZPKG7BCjtQIX7LyuzhDoILNM8a0AQnLvzacHoVaFAqV5Zt A=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 01 Aug 2022 07:32:54 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 07:32:53 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 1 Aug 2022 07:32:52 -0700 Received: from [10.216.14.65] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 1 Aug 2022 07:32:46 -0700 Message-ID: Date: Mon, 1 Aug 2022 20:02:41 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v3 1/8] drm/msm: Remove unnecessary pm_runtime_get/put Content-Language: en-US To: Rob Clark CC: freedreno , , , "Bjorn Andersson" , Jordan Crouse , Jonathan Marek , "Douglas Anderson" , Matthias Kaehlcke , Abhinav Kumar , Daniel Vetter , David Airlie , Dmitry Baryshkov , Sean Paul , References: <1659174051-27816-1-git-send-email-quic_akhilpo@quicinc.com> <20220730150952.v3.1.Icf1e8f0c9b3e7e9933c3b48c70477d0582f3243f@changeid> From: Akhil P Oommen In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/31/2022 9:25 PM, Rob Clark wrote: > On Sat, Jul 30, 2022 at 2:41 AM Akhil P Oommen wrote: >> We already enable gpu power from msm_gpu_submit(), so avoid a duplicate >> pm_runtime_get/put from msm_job_run(). >> >> Signed-off-by: Akhil P Oommen >> --- >> >> (no changes since v1) >> >> drivers/gpu/drm/msm/msm_ringbuffer.c | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c >> index 56eecb4..cad4c35 100644 >> --- a/drivers/gpu/drm/msm/msm_ringbuffer.c >> +++ b/drivers/gpu/drm/msm/msm_ringbuffer.c >> @@ -29,8 +29,6 @@ static struct dma_fence *msm_job_run(struct drm_sched_job *job) >> msm_gem_unlock(obj); >> } >> >> - pm_runtime_get_sync(&gpu->pdev->dev); >> - > This is removing a _get_sync() and simply relying on a _get() (async) > in msm_gpu_submit().. that seems pretty likely to go badly? I think > it should probably replace the _get() in msm_gpu_submit() with > _get_sync() (but also since this is changing position of > resume/suspend vs active_lock, please make sure you test with lockdep > enabled) > > BR, > -R As discussed in the other patch, this is correctly handled in msm_gpu_submit(). And from active_lock perspective, there is no change actually. GPU is ON by the time we touch active_lock in both cases. -Akhil. >> /* TODO move submit path over to using a per-ring lock.. */ >> mutex_lock(&gpu->lock); >> >> @@ -38,8 +36,6 @@ static struct dma_fence *msm_job_run(struct drm_sched_job *job) >> >> mutex_unlock(&gpu->lock); >> >> - pm_runtime_put(&gpu->pdev->dev); >> - >> return dma_fence_get(submit->hw_fence); >> } >> >> -- >> 2.7.4 >>