From patchwork Tue Dec 19 17:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 181111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2082628dyi; Tue, 19 Dec 2023 09:06:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV9PUH6XfczbvWrJqI/wraZl9Bx2hGLzVvWaPVxWDLr1MLEfYT6vdxNKiqf9Fb6IzBdqpi X-Received: by 2002:a2e:9c81:0:b0:2cc:6dde:b9be with SMTP id x1-20020a2e9c81000000b002cc6ddeb9bemr2199975lji.18.1703005593337; Tue, 19 Dec 2023 09:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005593; cv=none; d=google.com; s=arc-20160816; b=FgeX3+Ha+BdNfubcwB/GQ7gkHpQZrrHrZTaBMSJssj4Koi/iOjgh+C7XkB7qaNBUAt 4gYZOL6pPldt0iGuK5GYNuJpZkf+ckw/JPDqATsBx/nkUIUGPW/bHnSbKyCFT/UqOux5 kRd8kLAV00n/iJUDhQ+nNQ+mMhQOzg1+SW9ix45RgTP/UV9y0BN9aaei4o03RGrS1hR8 LTubCNHrhfudg58gMCoXoEKpkvCV/ZGo1nNmf3CNwI10YiiIyNrHRumnmR+8+0hyzN8J Hpy/TOJmYz7IC/4ROqWPj2SkKu9ntlrYyizeLxa9eeLMWcgXb+2yWvqG+E6lqWA/lFv1 G1NA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5631-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z1-20020a05640240c100b00553a50492e4si508280edb.388.2023.12.19.09.06.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:06:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5631-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5631-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 89D371F25D36 for ; Tue, 19 Dec 2023 17:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B16A93D0AE; Tue, 19 Dec 2023 17:01:28 +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_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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785730792890921388 X-GMAIL-MSGID: 1785730792890921388 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