From patchwork Fri Dec 22 17:42:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 182741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1224218dyi; Fri, 22 Dec 2023 09:46:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpFkeONTL2vH5fhc7lBEkrqxUZaw7AGl6QFR0Qty+C8Fqy988s2ZtazbYWtHLOGlG2Tfq2 X-Received: by 2002:a05:620a:3954:b0:77f:6baa:b730 with SMTP id qs20-20020a05620a395400b0077f6baab730mr1894861qkn.156.1703267182995; Fri, 22 Dec 2023 09:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703267182; cv=none; d=google.com; s=arc-20160816; b=seFLKOsru5hCISYGb9b/R9uj/DGGWQ6HrxdB623GPUC/ZknCvRt82DGqNUysUXjO1p h5uwWu2NBreAHLYIP68oMemxogf1EvqbVmTwDdfVbK3bdElFipO6i1NBGn6rgo49Ax7x B7wTB2vL9hwZQZS2WRBvPQismj3YI3tYeUkF7L24bntN5jqIR8syMcjdxuAfbEvvNRgH iw/KZ3vipsiwSw/SfigXoY6jpKLGGAweFs3lucfUPCv2bVIrahY0iZkJASsMKd9GtqJX ILnPU/oxfemeK/auseSG+yk+1VkhGbPorQMCO5D0fMhE6jxJIM8n2JxduZ4fI/Ax8+vT vtBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LfMKOfn5qhMsr90aHA0q/zpw4x0Di/ZdGH16UYVoiok=; fh=ILBpZrHrAGk3RqnooEwjJ7i7l1xdG2UMpjp4Y/yk/eE=; b=Hgt0Ic4yMFxJhC9Vuo2s++RsyWL4Rv4scL11bEnnyuQJjqfD60CmOVqk6rNWGuaJ4N 1Dm8uqOa920l30+XwLAa/zkCdvpYVd08HmgTa4xILGtsJR8KjuiLM2S9RZRTmOpokqBI M/GbZVK/Sua4ql3GXJmtRKfE2104gebGeFr1Vx4cv02/9J36Qb3eBY3LYA5Tam6ni+h9 4KfsIyzqoIsiQiIJycfmdm2uzzOF9ERV3oRGVgE9qwf4soGTnYZ0IhckxOvL50WCIJjq cKnNL1X/eQ1poAqjhH/lymSu++gMm40/yTu/QfYwrz6YlhRHKfGu+Qn/tYUTZISL7AAj jHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bR1HT6OQ; spf=pass (google.com: domain of linux-kernel+bounces-9962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e9-20020a05620a014900b007811cc3b343si4264052qkn.120.2023.12.22.09.46.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:46:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bR1HT6OQ; spf=pass (google.com: domain of linux-kernel+bounces-9962-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9962-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C38961C224F3 for ; Fri, 22 Dec 2023 17:46:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1E97381CB; Fri, 22 Dec 2023 17:42:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bR1HT6OQ" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7658931750; Fri, 22 Dec 2023 17:42:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33666fb9318so1833330f8f.2; Fri, 22 Dec 2023 09:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703266951; x=1703871751; darn=vger.kernel.org; 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=LfMKOfn5qhMsr90aHA0q/zpw4x0Di/ZdGH16UYVoiok=; b=bR1HT6OQCga+s2dH5iI9/3UWB7DUa3iF4Wrx1kk8Vt0VSAyw00e9I/V8m99sdQ5rkO YXpsKkAUh0yTsEHw7RNEDKPhhH8Ef2qHdvzsZII4GRM8SbR6te0K51rTuXduGb5ZhugQ IsW1010ODyYyHKIDXVhZomSDxku4MpY6Q3F1Z9vPq1nFUbq+EwBakhEqvHuW4EHs0zgJ 9ZL0Jmh5m4mT7E2HVewSvXovQ15ER89sk63dD6FV6ddn4tL43f6mkG4JQFNq7HX8JJQ0 akCDC7AYPtfEsXz/16suYNGdX9gijn2FmPR11GtZox+NiBRXtwDYboDtaVfghUHX/fTh CXhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703266951; x=1703871751; 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=LfMKOfn5qhMsr90aHA0q/zpw4x0Di/ZdGH16UYVoiok=; b=UVDs77r0NoHDwyegvdsuOXP80oynOsZcIeRPLhUFYkO3VLcuEchbx0SIsMg5dNT4eS tMxyjU40tJUR/aLrrBJtB82D9Tg4N5tfRzUzswsn6VhQeeXe8AJR7MFEAGfnHPB4oZS4 2f8Ildf3uUqog8m9etGjZ/miVym9Rvzmx/TSrZrTLKaAulvJH6uu71ITKb3ImgNIcvMa 4TLwSvGjh8EYdGXmFVH37ibG/SVv5BbJDA9NvtLNQlAyk27CJXlmmsdiJSh2zRNI+PRw g7LuM6gIEleqclYK3s6Twz1UTbC2J1lN2YYmytJbIkcJHhmPhUqmC0+tcoDQ3rThYzSD 6olw== X-Gm-Message-State: AOJu0Yw76ED49QsL6qa2etOx3no1rZ5biat9dObiBeyGRJP1794vQioG FfgcLD9B0ZpRp6HaPVBD1Q== X-Received: by 2002:a05:6000:235:b0:333:12a3:644a with SMTP id l21-20020a056000023500b0033312a3644amr946812wrz.18.1703266951663; Fri, 22 Dec 2023 09:42:31 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:f3ae:2788:7e03:f44]) by smtp.gmail.com with ESMTPSA id w10-20020adfec4a000000b00336670abdcasm4777116wrn.40.2023.12.22.09.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:42:31 -0800 (PST) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Jonker , Alex Bee Subject: [PATCH v4 13/29] drm/rockchip: inno_hdmi: Drop HDMI Vendor Infoframe support Date: Fri, 22 Dec 2023 18:42:04 +0100 Message-ID: <20231222174220.55249-14-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222174220.55249-1-knaerzche@gmail.com> References: <20231222174220.55249-1-knaerzche@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786005089678229352 X-GMAIL-MSGID: 1786005089678229352 From: Maxime Ripard The HDMI vendor infoframe is only meant to be sent with 4k60 modes and higher, but the controller doesn't support them. Let's drop them from the kernel. Suggested-by: Johan Jonker Signed-off-by: Maxime Ripard Tested-by: Alex Bee Signed-off-by: Alex Bee --- changes in v2: - imported patch changes in v3: - added my SoB changes in v4: - none drivers/gpu/drm/rockchip/inno_hdmi.c | 35 ++++++++-------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 102195837206..5c9f1325441f 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -206,11 +206,15 @@ static void inno_hdmi_reset(struct inno_hdmi *hdmi) } static int inno_hdmi_upload_frame(struct inno_hdmi *hdmi, int setup_rc, - union hdmi_infoframe *frame, u32 frame_index, - u32 mask, u32 disable, u32 enable) + union hdmi_infoframe *frame, u32 frame_index) { - if (mask) - hdmi_modb(hdmi, HDMI_PACKET_SEND_AUTO, mask, disable); + struct drm_connector *connector = &hdmi->connector; + + if (frame_index != INFOFRAME_AVI) { + drm_err(connector->dev, + "Unsupported infoframe type: %u\n", frame_index); + return 0; + } hdmi_writeb(hdmi, HDMI_CONTROL_PACKET_BUF_INDEX, frame_index); @@ -226,28 +230,11 @@ static int inno_hdmi_upload_frame(struct inno_hdmi *hdmi, int setup_rc, for (i = 0; i < rc; i++) hdmi_writeb(hdmi, HDMI_CONTROL_PACKET_ADDR + i, packed_frame[i]); - - if (mask) - hdmi_modb(hdmi, HDMI_PACKET_SEND_AUTO, mask, enable); } return setup_rc; } -static int inno_hdmi_config_video_vsi(struct inno_hdmi *hdmi, - struct drm_display_mode *mode) -{ - union hdmi_infoframe frame; - int rc; - - rc = drm_hdmi_vendor_infoframe_from_display_mode(&frame.vendor.hdmi, - &hdmi->connector, - mode); - - return inno_hdmi_upload_frame(hdmi, rc, &frame, INFOFRAME_VSI, - m_PACKET_VSI_EN, v_PACKET_VSI_EN(0), v_PACKET_VSI_EN(1)); -} - static int inno_hdmi_config_video_avi(struct inno_hdmi *hdmi, struct drm_display_mode *mode) { @@ -265,7 +252,7 @@ static int inno_hdmi_config_video_avi(struct inno_hdmi *hdmi, else frame.avi.colorspace = HDMI_COLORSPACE_RGB; - return inno_hdmi_upload_frame(hdmi, rc, &frame, INFOFRAME_AVI, 0, 0, 0); + return inno_hdmi_upload_frame(hdmi, rc, &frame, INFOFRAME_AVI); } static int inno_hdmi_config_video_csc(struct inno_hdmi *hdmi) @@ -408,10 +395,8 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi, inno_hdmi_config_video_csc(hdmi); - if (display->is_hdmi) { + if (display->is_hdmi) inno_hdmi_config_video_avi(hdmi, mode); - inno_hdmi_config_video_vsi(hdmi, mode); - } /* * When IP controller have configured to an accurate video