Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2931121rwb; Mon, 15 Aug 2022 14:17:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6m00DvLF0lTilO8j8AARBcuTWoYNCzDGyGEtHpZ28DNCWF3+JRK4ykI9jn4QwHjPymInRq X-Received: by 2002:a17:907:6d8c:b0:731:6c60:eced with SMTP id sb12-20020a1709076d8c00b007316c60ecedmr11824460ejc.266.1660598110108; Mon, 15 Aug 2022 14:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598110; cv=none; d=google.com; s=arc-20160816; b=MebAgSUpHZrUG+u4uD0PBWwAczETgXZNroxKTm3fRvLug3BSQP4aVUxsFfJOYRQR7m kXqIw/AwjvMKG6Kexr/gsRbYa5A3eavmH8hLOCU1ZIMpxIEBTQqsgf3mAzqcLDuD1UcN U8wOnxLgGFeNIV1NOEIs/TK7xBweHe+fV7s1iB0WlQ46Z4y2Dl/ap0+Ayp6YR2e+uplk 6DiDxnsxd0YTsH8RgN/Ed85mI2MS1SiY45S4leNESkM7bB6nT31wv3e+0KAs+V+Mt8aj xgpuQx+e1iKBr/oXZn11OtTF62IPSKPFl8vzzAxy5HtiA0RwbaHPbV9kNVltoljt9fIK 7yXg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f8AQVyu0E69aW3Bb7YxmA7GNPZms/PHNV2GLP1aCGYA=; b=K0H42vDZGCocIBPIVmkK8Kx/yvO9zSATOMvb+0BvxCJkNzyZJZrmtBEpsjsf21U2OY kpLthQm3zdVcp38w6IC5cwW3t0XDOCmZvXSTYHapaR0FmsEaXHljzqtR4hoHUrqnrOix z3C/+NRti2NAktGXZq7NZ1cGtaoerAA/gg591EBOFnqSaev5GPe3Y/RRs6OQPrpM8igD 81ySBxNes5CQrXT+PdFYiYqQjzLdgCqUOhh0W1MMtuz797Daef5K1VtBHrILOuWxY6ph 5kuHV2i8IqPeQn/vIpvgYT5sM/cvmyi6C7CcaQyyed+HSaIfOj/phyrWwmALEb432+Gp 5PWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lhTUJ0QV; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb7-20020a0564020d0700b00440253e1144si10185009edb.277.2022.08.15.14.14.43; Mon, 15 Aug 2022 14:15:10 -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=@linuxfoundation.org header.s=korg header.b=lhTUJ0QV; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230020AbiHOVF0 (ORCPT + 99 others); Mon, 15 Aug 2022 17:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244497AbiHOVCy (ORCPT ); Mon, 15 Aug 2022 17:02:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8EAFD11E6; Mon, 15 Aug 2022 12:14:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7D25CB810C6; Mon, 15 Aug 2022 19:14:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1A7CC433D7; Mon, 15 Aug 2022 19:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590858; bh=++TwpD11aNdUDmi97Map4GQL5JJLoabfwqBMgIhuLCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhTUJ0QV2P3dwrMrwGazfMUMH+C2guoUtZyJGTjMK0YjJVV4O7uxem2LdRRS9hFrS ItV2WndCXpR6Yx1wC60qNi0JBl8t7lsdj347JUwlqu83zdLKiSAKXyBFHrycF4jel9 jDcZlTQIlJ/LFNfsyEPzjzOitHL0w04g+NZZj7lE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Stevenson , Maxime Ripard , Sasha Levin Subject: [PATCH 5.18 0392/1095] drm/vc4: hdmi: Add all the vc5 HDMI registers into the debugfs dumps Date: Mon, 15 Aug 2022 19:56:31 +0200 Message-Id: <20220815180445.915915848@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Dave Stevenson [ Upstream commit 25eb441d55d479581a65bcc9de88bc1d86bf76c1 ] The vc5 HDMI registers hadn't been added into the debugfs register sets, therefore weren't dumped on request. Add them in. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-19-maxime@cerno.tech Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_hdmi.c | 39 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vc4/vc4_hdmi.h | 8 +++++++ 2 files changed, 47 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 3ff35e3649aa..2ff53482d5d1 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -122,6 +122,12 @@ static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused) drm_print_regset32(&p, &vc4_hdmi->hdmi_regset); drm_print_regset32(&p, &vc4_hdmi->hd_regset); + drm_print_regset32(&p, &vc4_hdmi->cec_regset); + drm_print_regset32(&p, &vc4_hdmi->csc_regset); + drm_print_regset32(&p, &vc4_hdmi->dvp_regset); + drm_print_regset32(&p, &vc4_hdmi->phy_regset); + drm_print_regset32(&p, &vc4_hdmi->ram_regset); + drm_print_regset32(&p, &vc4_hdmi->rm_regset); return 0; } @@ -2374,6 +2380,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi) struct platform_device *pdev = vc4_hdmi->pdev; struct device *dev = &pdev->dev; struct resource *res; + int ret; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi"); if (!res) @@ -2470,6 +2477,38 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi) return PTR_ERR(vc4_hdmi->reset); } + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hdmi_regset, VC4_HDMI); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hd_regset, VC4_HD); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->cec_regset, VC5_CEC); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->csc_regset, VC5_CSC); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->dvp_regset, VC5_DVP); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->phy_regset, VC5_PHY); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->ram_regset, VC5_RAM); + if (ret) + return ret; + + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->rm_regset, VC5_RM); + if (ret) + return ret; + return 0; } diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h index 1076faeab616..2b9f5ca15a40 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h @@ -184,6 +184,14 @@ struct vc4_hdmi { struct debugfs_regset32 hdmi_regset; struct debugfs_regset32 hd_regset; + /* VC5 only */ + struct debugfs_regset32 cec_regset; + struct debugfs_regset32 csc_regset; + struct debugfs_regset32 dvp_regset; + struct debugfs_regset32 phy_regset; + struct debugfs_regset32 ram_regset; + struct debugfs_regset32 rm_regset; + /** * @hw_lock: Spinlock protecting device register access. */ -- 2.35.1