Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp56755rdb; Tue, 19 Dec 2023 09:12:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHFA+RR1NyIb54id1QqAyFTY8EH/vSZHrBWH2l3wYanZ+XN7uIFSx8k+TjuCwsrWmatoSB X-Received: by 2002:a17:906:28d:b0:a18:6f67:49a with SMTP id 13-20020a170906028d00b00a186f67049amr8844633ejf.13.1703005930505; Tue, 19 Dec 2023 09:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005930; cv=none; d=google.com; s=arc-20160816; b=zNAfzj1AF2vNWiTJSuBIDsGXHePYZjK1Ndlz/Ss7Qjl8ELLzZ+wFviLAzZEJXZY1On 5ZaXsLreRrgIOy8jLtURkIXkG2U9Bh3oT5gnKbd24fOZ3tiCzaT+CqP5eLSPkweaMWoD N7O2vc3l6/CUd2a/BWL1mxfc++Sn6UGBXHfiiD4Kx8FqnVbllHmJFh0WlthFta4QLTJm RONFjPFcwdWgGBoBYGCUa2RdqYNMtVhitWjvhspnQ5dRMS3juc6mjUyakdjdxKBMdY8Y xj05MRcX/bxVZdx6OlwFck//YfskjHibl7ikpskS3gMKirzjbm3fY/qo+PRxDTbXLUMH oSsg== 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=3jFSrF2ePa7xhmT4OxproAZh4Ygmdhf+/ONdKCw7fIs=; fh=ILBpZrHrAGk3RqnooEwjJ7i7l1xdG2UMpjp4Y/yk/eE=; b=EpT9GiotGTtuacafwRmZjhTSeRTba51XqymzfbYSwtWEmOj7i+Woh7CZ6H5v7w2eeG hPrq1nbGV3Q1xRM5au1K//ThXiBP81yd/9Lun/sNQYEmGDjr+39He3wfgSgS0etNNsDg llYhLjTkroyWX5uIw8K5NS/eXihuRYw90OTp+y4x4NTdowD5fLJ2dquHaP59QLKPQIOn v7FjBZ3clQEsAD3/WfKRzbkZMxumarbRS3CrqaZIKFi9V6VixM8KuKybfIVXqXNLo3JM uQNrYDU6meYV/IPxnyCSsyPS8PF9BUS06AQMAp7xGb9WD2GHah7YLQYYKthBhtGeZE5s bqtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LT+z87q5; spf=pass (google.com: domain of linux-kernel+bounces-5631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t13-20020a1709060c4d00b00a2349bfc85esi2296581ejf.734.2023.12.19.09.12.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LT+z87q5; spf=pass (google.com: domain of linux-kernel+bounces-5631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5631-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4BCAA1F287A0 for ; Tue, 19 Dec 2023 17:04:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4258539AF2; Tue, 19 Dec 2023 17:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LT+z87q5" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 9DE9938F8A; Tue, 19 Dec 2023 17:01:20 +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-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40b5155e154so60384185e9.3; Tue, 19 Dec 2023 09:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703005279; x=1703610079; 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=3jFSrF2ePa7xhmT4OxproAZh4Ygmdhf+/ONdKCw7fIs=; b=LT+z87q5RAbrmVLOBn5lhiUoSb3CS8JXqumeL2MBDd4oOeCKMigpW+oRyThw+/ch7O XjZRXILO1+PFqSpfZlAzn0d8AbtQljZq24iHKDSKE+H+fHmusCeYZUXX+r6XSroeMvR0 ApryE6WSH2KD39wFrqhD4QOHsYzf/83jDpmMXGUGO1NvnS+32vcgOdtPR5Q4N2NKywvA 96ai4Njlb+ve73hVQkLzvcDZIo1J/QcQgwzsGQQzdTwqSBDfU3zMohFVy1rHPVrFwwbU upxlu3CbS0po8Vq9MolDH6C1ti9WjGdDL/qJUJlhziCdx9/P/DqhvaRymRxqZ5EkxH5s 5wuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703005279; x=1703610079; 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=3jFSrF2ePa7xhmT4OxproAZh4Ygmdhf+/ONdKCw7fIs=; b=nunpS2o9zYlfupEnZy1wJ1E7BM7SFMxZATYl0MsVzXs74dBFgMOOvSq/La/jGrgfEz muo67FR4BGvmdrlxZXId51mX3RqoVkE3vppzgthIT1m/xllN3BenniRTKuUQd+0/7TFy ImBuTG4IW77AB6PKcobgGe69pT5RA/ZsbcZfqCI1sdVVMund0rW1BXoOPm8M57+YSCI7 Fyo2V0WN2YbfZ3vCiMrUI9NMXOZxuHSPOGyc0gXON7SZsanGWwv6o6Ja8+yl0vkTZt1+ W9x+XJ4CsjPIB3U5P8uPE0oYHPPCjmM6Ddqpc5aspHOyYondpKFQHvDZ6J9zPaxJUynw 0fag== X-Gm-Message-State: AOJu0YxRaSAA0PgGMAnLpkn8RAX0HvWbuDS3rTWoYhg6qW7usUEguegv qbonbHfJvICeMGlBroZFTg== X-Received: by 2002:a05:600c:4917:b0:40b:5e4a:4060 with SMTP id f23-20020a05600c491700b0040b5e4a4060mr8802782wmp.128.1703005278839; Tue, 19 Dec 2023 09:01:18 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:7ae5:3e:d1c6:a138]) by smtp.gmail.com with ESMTPSA id i7-20020a05600c354700b0040d2805d158sm3225878wmq.48.2023.12.19.09.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:01:18 -0800 (PST) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=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 v3 13/29] drm/rockchip: inno_hdmi: Drop HDMI Vendor Infoframe support Date: Tue, 19 Dec 2023 18:00:43 +0100 Message-ID: <20231219170100.188800-14-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219170100.188800-1-knaerzche@gmail.com> References: <20231219170100.188800-1-knaerzche@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 -- 2.43.0