From patchwork Sun Mar 12 20:41:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 68569 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868525wrd; Sun, 12 Mar 2023 13:43:55 -0700 (PDT) X-Google-Smtp-Source: AK7set/qCirGzhAaCGtc5IFP4pYtj0ZfiOQdawwgXbN+48gadBwZnBQhyPZoQK6EUa9F9+lCJQTw X-Received: by 2002:a05:6a20:4fa4:b0:cb:af96:9687 with SMTP id gh36-20020a056a204fa400b000cbaf969687mr25792602pzb.15.1678653835013; Sun, 12 Mar 2023 13:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678653834; cv=none; d=google.com; s=arc-20160816; b=yZ9LIOK0/qrWW5oqXIrJiCibsmOcYAkfL0NkHhRCAEy+whDsC7AaNTIkQZ69fuMl5C Mk0ZzZdOSN88Pqj4ANLBKzUwtpMJEfVMw14anrw8ktYJiY2Rkd5ITNGfxxWqmTlblQpA QLJ4wxasT3JhA3vIxPrlqP5INuFc/nudqEpvIFD74vckb8MIQaUf9pXDNguV+NFfB1xV SRLy7mSwCfdZx6rqsreKD3wAjKqPwQSCEjJ9aPWubGDskvEn2xbb+zpWxEZ4NgB6K3xe lF07+cLHsyxSsE98XZDgfoNmjiXRd3TIl7zZgFd1SyOCkEfpUMOkmC9rXNwjvVVCaFQV i6GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ldFupt5wrZbRxkmdbQJ7PqzJnkF6w4MSZ/CZLw9J9jU=; b=lW1Vg4a65Nv3IrDHWlsN/cPPaa4B7oaRsrJG+rgXh2rTC1xZLPB/u+E579Qxv689Oy XxowqcsW9lzSYjMNwJ6BAjdmu2AVTzd5z1qv8rC6fMOxx4YCrmBhzBQSuZAK8oZLGIkI z8O8V5DI6hdRctm39aOMVDQOg7oulOanZlTlXudxLsFdrCvG1Ql7+2W+0MggqE/NUgF5 3f/V8C1PR7o3ZBaTUFOv18IVoMBXvWsQoqd7LIPW1Fkppbhv8PH17EuN5aKIc61X//Ni Ha3iA0Bxvo0HC6t7SU5IsbY2InQdtAjeeWsIAleoFmAVmiF0iDfrjMwZMhDic5Px2YQ0 kNIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P84pUSjC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u83-20020a627956000000b00622ae306420si3955075pfc.279.2023.03.12.13.43.40; Sun, 12 Mar 2023 13:43:54 -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=@gmail.com header.s=20210112 header.b=P84pUSjC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbjCLUmz (ORCPT + 99 others); Sun, 12 Mar 2023 16:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjCLUmk (ORCPT ); Sun, 12 Mar 2023 16:42:40 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE9CC36444; Sun, 12 Mar 2023 13:42:29 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id y2so10027413pjg.3; Sun, 12 Mar 2023 13:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678653749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ldFupt5wrZbRxkmdbQJ7PqzJnkF6w4MSZ/CZLw9J9jU=; b=P84pUSjCzIkoIgYt6UU3SmvPeySB6ogMNrsJYWlXc0yv0avhsPHyrha1RV5D6jPn+t fm16v1cSybQ37reDja2ftceIuj0n/NtUyjdfmKc4FkbI2hdI/v64GTOXXFtNbTTEhMy5 Q985CWQSQECgz84X+f9QcqdWs8NyQMS9AFjoStBniiatTpnMvkcBwTqiCkrC42Mj28IV wxBKqDvaqhb13LSXfgvBVsQpPSM9AbK25LXHmXVPtGKnw6PRo4+FnzT0dKijzME3LuJ+ V2yCLUuXZ8nRTgsn43U38HZJMCAGRhyaPrLZdPUpX9f579n//KAgRAGsIaKOSwh4arsN MrsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678653749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ldFupt5wrZbRxkmdbQJ7PqzJnkF6w4MSZ/CZLw9J9jU=; b=uIHatKbCTDmA4xlR6UpcRRUn0USAFspQsSOgCU5wDrWHq4+QgggeR+k8HaVSqzps4E 98XO/jaHBBd+Wh9ttTiSCcMJImO5v0jn+WXA4+wUz+cF2VWHu2AeKm+eFzC4NZnkcZiB dE/n8uuBhxOK6kTYoE/zFRPDG5ohyD0xl6M6beqerM/b1RxyyNUd/3B15hhLQIBbwe/Z 6ALOQWZ/7kKAtcFs7pMGfmY3DEdIPQARqfzNm0+lmrJuYd9j2qfcQuUI4XIaitaXk0fW zqCXLlCD6VI7y7FPkOaTFP7gnPCMkUPRm1QGyGbNmHkWLLtM2vF7/dwGhihPRqYDvuuN I9Cw== X-Gm-Message-State: AO0yUKXG5NxRyFTTWRA298iY315WXQEz3Fl9CQ+fdd3gfR/XD+MZ9OFL 4KbPhORfpx4+CRMjiGevqFk= X-Received: by 2002:a05:6a20:4422:b0:cd:bd86:318e with SMTP id ce34-20020a056a20442200b000cdbd86318emr41689013pzb.26.1678653749407; Sun, 12 Mar 2023 13:42:29 -0700 (PDT) Received: from localhost ([2601:1c0:5080:d9fa:9b45:95de:f47d:f85e]) by smtp.gmail.com with ESMTPSA id 131-20020a630289000000b004f1cb6ffe81sm3089968pgc.64.2023.03.12.13.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 13:42:28 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, Rob Clark , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Akhil P Oommen , Chia-I Wu , Luca Weiss , Maximilian Luz , freedreno@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 03/13] drm/msm/gpu: Move fw loading out of hw_init() path Date: Sun, 12 Mar 2023 13:41:31 -0700 Message-Id: <20230312204150.1353517-4-robdclark@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230312204150.1353517-1-robdclark@gmail.com> References: <20230312204150.1353517-1-robdclark@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760196123955268900?= X-GMAIL-MSGID: =?utf-8?q?1760196123955268900?= From: Rob Clark It is already a no-op, since we've already loaded the fw from adreno_load_gpu(), so drop the redundant call. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 817599766329..28cc5685ba96 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -503,16 +503,9 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu, int adreno_hw_init(struct msm_gpu *gpu) { - struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); - int ret, i; - VERB("%s", gpu->name); - ret = adreno_load_fw(adreno_gpu); - if (ret) - return ret; - - for (i = 0; i < gpu->nr_rings; i++) { + for (int i = 0; i < gpu->nr_rings; i++) { struct msm_ringbuffer *ring = gpu->rb[i]; if (!ring)