Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1036694rwi; Mon, 31 Oct 2022 10:23:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6hRx0oV4ZRVCfL4QBtGX+3Z6p/4h+j0nhFEUPdfEgq/lzmgbiDssksI82Mv2Maf6tgPruf X-Received: by 2002:a17:907:7f05:b0:78d:e869:f2fe with SMTP id qf5-20020a1709077f0500b0078de869f2femr13608037ejc.684.1667236997253; Mon, 31 Oct 2022 10:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667236997; cv=none; d=google.com; s=arc-20160816; b=UDjMWX7EmUhycLImcG336TVU4vIqJPYovW/hjOvK9SoP4QGKPH/RMmg4ctbxO2Br2Q jsz++ulYVYCx5D7Xp9PSo/tAYh/BizmMN0FFjmWp02KwEXwAD09qW9K8Px3TsP4FgQsD dTYqKCQKFxFpYXBdPgge54QAU3S6VZs8yOcYpSjInOjFAIaJwsG7Z3wM+HbD5CCrrZWX hPSyGKuyshn4paBmkInnMw4EfR46uW14PMYpF2tbaTberBGm7BozQgSebJNGKjzq+2Lj sxiQtKdHQYAvAeiRbWOy8IxJSittbCwnCQ31I8z0cVOHdqioxCtW4xqeea9q5bBHiANa EQhg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Ew7SqTPEFFhxu7/hKrNbrME/m/ofSkUv4YYTUxK9hTE=; b=bMXcN+X2noMRgEHVgWaMlubC0XZgdEDhxRQ6USIAuwmiuhd3SynDB8ITjNrI6+LKsD 9C1xdgosxM1JVqqRSnXX2eUZx1LDXZ69ohpucGEJ1h/4iHfiRiXnn6bqsXxamJGuFzoJ kIAFmhvDh5zkuwSgvXTVrAILbQbYwTdM2j+KOxAtGTv+0DkpbWO0pT9tO6iiiFt/83MR 6i5KGVGW2QnqT2UmVcveuvHtA0PN5grOvcsmEuHAA6mFyOva0TBHwWQyF4+1XCZtsdTH ILdpJ+jTO9MREBKwmuGjS+dWKCIl1SOpN2kT3k3WlRtg14AT0QKM7R9xOdKB0wSjhbuI ngXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LNy0wlk5; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bn13-20020a170906c0cd00b007ad69eba328si7516743ejb.539.2022.10.31.10.22.51; Mon, 31 Oct 2022 10:23:17 -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=@chromium.org header.s=google header.b=LNy0wlk5; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbiJaRQP (ORCPT + 99 others); Mon, 31 Oct 2022 13:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231290AbiJaRQK (ORCPT ); Mon, 31 Oct 2022 13:16:10 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED8DE13CCC for ; Mon, 31 Oct 2022 10:16:09 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id q71so11239082pgq.8 for ; Mon, 31 Oct 2022 10:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ew7SqTPEFFhxu7/hKrNbrME/m/ofSkUv4YYTUxK9hTE=; b=LNy0wlk54NXx0XGRLGJLTGHN4ywvxf5ommsqE1Fdvkb3oQxH48emeDOhk5HgzYYP5i D6Idhh6Iw5QX1O0N/ayHK9u2K512PuftFkYPlMpLOP7ZAjKaGvggrvDwGBhXal3Q86yb 19ek7qCAUe4SKIA9ct7LeonTh+0TQdvtmnfXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ew7SqTPEFFhxu7/hKrNbrME/m/ofSkUv4YYTUxK9hTE=; b=7EIL3xJC9N6b6HgP4NsQjtyB1uI6ScaBX9aq5TnSuA8BENxdkq9sFDHBDh/zThiVzn iblH4XWbaJYTB7sshTmkVCMghCbt/UWHBmu0Q91JQD449Lig1AQKI2tQcjq3Gnv7Gvxg 6gU28ko1mYqFaR/f2XhwVw47TS6Cbj6Xy0UhTH4Yh8lvPa4yHlD0QI7DqofUf9XG2GrG SPLYx/XLfaN5ppkr0FR2cHRMnMpBy2DxElYw/p4J8hrhLar7pgvSLN4SdA4g+kJytm38 4GkGt+OIAZ7V29NOa5fnOAuU0bf1/aZyk5ph/BReIybjL9cyrNMxMEpWbHQn4Ml/lIoh 7BYA== X-Gm-Message-State: ACrzQf3i0EqTGr1CtLFBYP2xRJmH4tpl4O+RVBOxnABLWBjiCgp3ueL2 0mhSK0EnUx4yAmR98EwQLwwCQLWB7rqb2g== X-Received: by 2002:a63:69c2:0:b0:46a:eeb1:e784 with SMTP id e185-20020a6369c2000000b0046aeeb1e784mr13351654pgc.589.1667236569518; Mon, 31 Oct 2022 10:16:09 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:cf9d:6561:637d:2194]) by smtp.gmail.com with UTF8SMTPSA id f15-20020a170902684f00b0017d97d13b18sm4679040pln.65.2022.10.31.10.16.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 10:16:09 -0700 (PDT) From: Brian Norris To: =?UTF-8?q?Heiko=20St=C3=BCbner?= Cc: Sandy Huang , linux-arm-kernel@lists.infradead.org, Andrzej Pietrasiewicz , linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Brian Norris Subject: [PATCH] drm/rockchip: vop: Quiet always-warning AFBC log Date: Mon, 31 Oct 2022 10:16:01 -0700 Message-Id: <20221031101557.1.Ic1569d394173c1c3016142fee4bb87a09753db94@changeid> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 The downstream code from which this was derived didn't ever run through this 'switch' block with non-AFBC formats, but the upstream code does -- we use this function to probe whether a given format is supported. Demote the warning to eliminate this sort of warning seen on every boot: [drm] unsupported AFBC format[3231564e] And make it warn more than once, because if we *actually* care to see what formats we're probing/rejecting and for what reasons, we probably care about more than just the first message. Drop the comment, because one of the two *is* commonly reachable. And lastly, drop the unreachable return; we'd do better to let the compiler complain if we start hitting this unexpectedly. Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index fa1f4ee6d195..aab77eb6caa3 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -316,13 +316,10 @@ static int vop_convert_afbc_format(uint32_t format) case DRM_FORMAT_RGB565: case DRM_FORMAT_BGR565: return AFBC_FMT_RGB565; - /* either of the below should not be reachable */ default: - DRM_WARN_ONCE("unsupported AFBC format[%08x]\n", format); + DRM_DEBUG_KMS("unsupported AFBC format[%08x]\n", format); return -EINVAL; } - - return -EINVAL; } static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src, -- 2.38.1.273.g43a17bfeac-goog