Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp445781qtf; Tue, 16 May 2023 09:52:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Mmyn2c0gFMAfilntQHgumYacl58Fq6x8NLYMc4DPiOGMY7okRmeVkSefwyC6ZcJ6Jsolz X-Received: by 2002:aa7:8889:0:b0:64c:a2f6:88e0 with SMTP id z9-20020aa78889000000b0064ca2f688e0mr10190034pfe.28.1684255961875; Tue, 16 May 2023 09:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684255961; cv=none; d=google.com; s=arc-20160816; b=praendEGxd1cpmyDUd3IsouKMugMgZIZtay1Zef1FwgRUTx6aKrHkHdv55QxpWHNGU /qUy4hmgbWOPQK7h49eIHV49yeB7ZMENEVHEVZl+mxYhAZCtVGMCZHG2NVMa+NhAB4FQ EkZunbSeQHd4ORb7jvXryhszamnmvm1HG/UFQ4Fi3Z1GZY5YIvJFljfWoLVH0KhTNpJs BJ+JMYGAWCXeP1VmaRoqgoxyfGnz90ca/XiOaRFDYKr4plVa7YZHc66omQ1245hpulak Rh5g8LZR2HhfBRRT/KiRwW5X0SN9h9nwDs+v9T+TcrWaIZ6qOrEF0sNO6neJ//I4dO2r 4Kdg== 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=9RRIvZyK8CQAM0dAt4H7LQ/6jjtstZYibAABduiNmKg=; b=BfmgP76K728w4RhEUeIvkQ7Iqy2Mwq8JjfCTc05hpTHUl5DmO8iiy4GCZNKle+mR7J v5jNwVAm7j0ceR1lpw3TDHz9rCQhlXU5wuZz0nua63+wnSrUuZSpx6dJLCCZZ3x5di3b 182799pf0hBf21UU+GjHx0pbtUzYuj+CiytkjbD3cbULIBNF16Eu6iZ9RbQgpCXkRKvB aQMKHaIqfaMWzBXSNXhriKgwYffLoZ5cGOT2JWwcO19+nLjMUHxG6I3fZyyEa39kPtoz o59k9zDhiv5O7qrFZSAQprPRTLDvk3FilHC/1Q7liZamb41ccZbId9RQyqsnAt0yOr+z 3p2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shruggie-ro.20221208.gappssmtp.com header.s=20221208 header.b=1pki32Ck; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020aa79e91000000b006452ad45992si20105017pfq.3.2023.05.16.09.52.28; Tue, 16 May 2023 09:52:41 -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=@shruggie-ro.20221208.gappssmtp.com header.s=20221208 header.b=1pki32Ck; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjEPQoY (ORCPT + 99 others); Tue, 16 May 2023 12:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjEPQoX (ORCPT ); Tue, 16 May 2023 12:44:23 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD0F3D3 for ; Tue, 16 May 2023 09:44:21 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f475366514so53078795e9.2 for ; Tue, 16 May 2023 09:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shruggie-ro.20221208.gappssmtp.com; s=20221208; t=1684255460; x=1686847460; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9RRIvZyK8CQAM0dAt4H7LQ/6jjtstZYibAABduiNmKg=; b=1pki32CkIzhFh7JpQ37UTbB0z/0EiqVq7PJo2o0rHD72vTZTKzznUr+zstjp6pW7Ek 5Nncvby+RBLpFydfYP84Daneai9k97DsMIaSrrbDD2SGqejUaoLaDb0kwqmgr6LTOVBM EEZ0w0sgFmstOkKPYLbUfMogrU9cEIaCLDXfBZicSZMEg6NLwUAlaWZoUQNcHuT9Y1e5 xkgjVm2RC8QFLOhwL+EmZsEC7sLbKn/TUoGwMc9S928xL1uFyTbzKBPxqhNiqBE1wjVw mM4oNJk0AEedy4oa0o3oQ4fzrwbHGgQyzhjNX2iz0tBRCnhfq/utsw5L2htW22SNNyMk 9T8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684255460; x=1686847460; 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=9RRIvZyK8CQAM0dAt4H7LQ/6jjtstZYibAABduiNmKg=; b=HsUlomHn1Lutp99xUWYLMNgW5b1xIgVAn3WjnUYBAtxw0nfMekSEMRNWO8QzZhoDU+ 6+ywBmM8S8ONiGqI8S7c/CU6/lKNvQjRqm2cxH647EzD1L2FJa8JqshMPx+7Bbbc1iig bHP+o9POAcniGuelzKnbYKgECPeCOf4jTHqQy+8ICZ+pwsq9+kDY+WnYUSwlw05QKM0X cTt3wPELcPYt1/mIQl4x02J9O0745WaiHZKlPxO5hwRrM2T51l/p8KU+iyIoKXpshV6/ wZ7hMWemHsPuiJfea/tOKxt1GF9N09hhqXTbahiwZFRqqcoT0HsnmDbVK6Q1kgLzjtVl OYZg== X-Gm-Message-State: AC+VfDwCxjmCBcjak0xn6SsePb8kL1HvVCrC9ChZZtr8qH6NsUWko5kd 5y/IkRulpe0q39q2gviiwi3FyfnzNXw40BJgt5k= X-Received: by 2002:a7b:ca51:0:b0:3f4:2148:e8e5 with SMTP id m17-20020a7bca51000000b003f42148e8e5mr23269068wml.1.1684255460042; Tue, 16 May 2023 09:44:20 -0700 (PDT) Received: from localhost.localdomain ([188.27.132.2]) by smtp.gmail.com with ESMTPSA id h18-20020adffd52000000b003063db8f45bsm3219899wrs.23.2023.05.16.09.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 09:44:19 -0700 (PDT) From: Alexandru Ardelean To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: airlied@gmail.com, daniel@ffwll.ch, Bogdan Togorean , Alexandru Ardelean Subject: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5 Date: Tue, 16 May 2023 19:44:16 +0300 Message-Id: <20230516164416.11616-1-alex@shruggie.ro> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, 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: Bogdan Togorean For ADV7533 and ADV7535 low refresh rate is selected using bits [3:2] of 0x4a main register. So depending on ADV model write 0xfb or 0x4a register. Signed-off-by: Bogdan Togorean Signed-off-by: Alexandru Ardelean --- drivers/gpu/drm/i2c/adv7511.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c index 61aa824d45d2..e016105a8fbe 100644 --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511.c @@ -729,8 +729,13 @@ static void adv7511_encoder_mode_set(struct drm_encoder *encoder, else low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE; - regmap_update_bits(adv7511->regmap, 0xfb, - 0x6, low_refresh_rate << 1); + if (adv7511->type == ADV7511) + regmap_update_bits(adv7511->regmap, 0xfb, + 0x6, low_refresh_rate << 1); + else + regmap_update_bits(adv7511->regmap, 0x4a, + 0xc, low_refresh_rate << 2); + regmap_update_bits(adv7511->regmap, 0x17, 0x60, (vsync_polarity << 6) | (hsync_polarity << 5)); -- 2.40.1