From patchwork Mon Dec 18 15:48:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13497182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32E05C35274 for ; Mon, 18 Dec 2023 15:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IeIjuVThTo6VR5BKbYNcjpGjAZH4IZ48EE49XPz9Xog=; b=pn5c59j9CeDWFS wZsvdf6zjncslassB2BgRIrDidWkvzswWo8LA7WgIpJiBpmKMiTDJpOPHcNy/nINXcvpAKTdqxemK Z1zlQeHNe/Ryuj6bVz7Ap7NW8ZebB5rclNHksHcfYtecL3zBOIsKuWe/aBI2tVJjovR92uRSfyAtr cD6V1wutJsBh4SiPbvHqGFYsYg73Hporkkcc8Qz9MZf+ENyUEILKfgDr6idWXCoTc+D1ceg2tlBzR vNNbmCmnu5r673zuYY6WZP+crg0KLBAARZe8SVuAKQVb1MIWc9in1cjRVffSiSgZkCV0cZEmiVDE/ 1G3hA0TUgvuK+O/7SLwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFFrL-00BHjr-14; Mon, 18 Dec 2023 15:48:47 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFFrI-00BHi1-10; Mon, 18 Dec 2023 15:48:45 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a236de428a5so15588966b.0; Mon, 18 Dec 2023 07:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702914522; x=1703519322; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=nKUBapAjhj0X0B96M3zAwIkjMB25EHCfu9hZ082V30o=; b=GPF0NwP7f0oZajnGGR87FPRSoRlBUJ1M/dz2BMpw8IFEzrSVV4IlgDmsd9isKrdOA5 fZchj1h9cuLCRUX3tqnozpkQs6yXAfkEFUfqvd4u7pel/lAwcqwO8NrqYio9H5EH12k/ RW+zUpck3cv1nuglvFcqHQwEXW/1VClBlmBgKn5TBISbVFC+oFruxB+B6mlR5sK1ZtMR DasQjIGt84jq5RsQqvCb+i1CUAsFp7NMK4w7Vw6Nm4w1Ti1bZ2xfH+czduNBwuWmsbpO sNsKofIBRGk5HBdsKYSpHPn6/ZLwJ/BptULFwYd6Q4mb9oTPuMC4Obh1r5j1v5bUtWAB zOOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702914522; x=1703519322; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nKUBapAjhj0X0B96M3zAwIkjMB25EHCfu9hZ082V30o=; b=Os3edFD65av54GaTfD5f7MSpqpv+qVdcNyJuG9pl6KRcLHhNh0AhhtZiilDwTSpk4E GeeEscc6cEkyi+C5PlmGxiPJ1a+VuxvDrKnLFv/9mZFLbMpnKUmUjo0uOoNFeTY8lezh UZWf19M+6ZgMwVCIYmXLBJT79IKtu4SXEfh976pO/TI03STK+pj9pQem1ffULX+eukye 3B1ShR3qAnOBYJmALYW5ltp8cnJjge/2DB8ku+lgdnjL2OrMHPl0PbnVLeM9SAwo6jCF tmGm6Qw8zHtYePr1YcyBZN7HVkuRDDNZWSX3MWHMei/tEOK2vQhs7ameG7Hsh/OUnNFe 66Yw== X-Gm-Message-State: AOJu0YzKlWCzFzAk2v3b5vFKoHt56N4tAU/VnO6tfBaIuCMGqEQ4njTF 2qfSJZPif0XfusciLlph9+o= X-Google-Smtp-Source: AGHT+IG6VzyjvQH34+G4mZe3J8X6d+shURJPU4OY3fo8K/ff+S+V8abQzu8/HpzcKzta+X+jlpzp8Q== X-Received: by 2002:a17:906:7399:b0:a23:6c6e:6b4b with SMTP id f25-20020a170906739900b00a236c6e6b4bmr282667ejl.45.1702914522076; Mon, 18 Dec 2023 07:48:42 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id vq6-20020a170907a4c600b00a19b7362dcfsm14334325ejc.139.2023.12.18.07.48.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 07:48:41 -0800 (PST) Message-ID: <745f84db-dc9b-81b2-6171-4d8d86a96966@gmail.com> Date: Mon, 18 Dec 2023 16:48:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 From: Johan Jonker Subject: [PATCH v2 1/2] drm/rockchip: rk3066_hdmi: remove unused drm device pointer To: hjc@rock-chips.com, heiko@sntech.de, andy.yan@rock-chips.com Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: Content-Language: en-US In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_074844_359279_C9F8BBA1 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The drm_dev field in the rk3066_hdmi struct stores a pointer to the DRM device but is never used anywhere in the driver. Let's remove it. Signed-off-by: Johan Jonker Reviewed-by: Maxime Ripard --- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 -- 1 file changed, 2 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c index 62e6d8187de7..0dac6d133767 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -40,7 +40,6 @@ struct rk3066_hdmi_i2c { struct rk3066_hdmi { struct device *dev; - struct drm_device *drm_dev; struct regmap *grf_regmap; int irq; struct clk *hclk; @@ -752,7 +751,6 @@ static int rk3066_hdmi_bind(struct device *dev, struct device *master, return -ENOMEM; hdmi->dev = dev; - hdmi->drm_dev = drm; hdmi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hdmi->regs)) return PTR_ERR(hdmi->regs); From patchwork Mon Dec 18 15:49:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13497183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8250CC35274 for ; Mon, 18 Dec 2023 15:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FS7/f/ISpYx2fP2hy/Z2E8Fzzfa282C/0w7fVt/pL9Q=; b=tBKNBZ5+tYnbT0 TyZwyyEe8o01Kkfv655SsUptrLjCQi6RXnO8r9w6mpr5Zy+JDnRBg19ZEFwjrEsZed797sJ1oC4rs qRVOI7AR5fILjkjrWDkEk9sTV7dy3r7J2C/e/NaNWl1SKEWNTP9ETjuO7qOXqx0HUu3DfobsXaDGq tbqTgKHJncAKjsm/SrxdfbLHgxariYWWXXbfK6/UuNGnPRyilsit9F2XRrmZLTxABa/qbyLpelRm7 gUWl9q6j2+vefzAdJd0jhEnHpOLlSEVWjY1T7d/x8OYXcJs4FHgjB61y4uBs2F1uUAGbuUxNQoCen DCk1PgeeDjJKjOqKg5Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFFrm-00BHxe-2M; Mon, 18 Dec 2023 15:49:14 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFFri-00BHu0-1r; Mon, 18 Dec 2023 15:49:12 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5532b348d30so1613851a12.1; Mon, 18 Dec 2023 07:49:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702914548; x=1703519348; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=DCQzgc7HZIXkjhrSZNLJQoxchuiI/YLWggopgdNCG/w=; b=X/5KY3QHxI+m38mz4QxpNAbcSxDFbspj0RYuekGuKlPz3L/CTgUA2K07TNm9bK6jAw fLW3rdB9XylxOOoJXUAfHlGyYEXmBXg4jTkvEkSOtmbVtUG21THuuYTGkYbcW7NUqZ+b jwE6uBrdhtd7Vot9qAG/Aj0Z21neOIl4o17BhWLhmR83N2bLS03zSXJ1PpLohiccYH// FRaBNKj8y6L9/jU+eYtugR0i1mhVJ5sCoK+ED4oXmY8gZkz2mKDz3zvtel3ehPRGzqSI l5H2kspXvKacfm1cdWLXs8/PDH2kZiFj//equlTeGaztfvBSu8iVEHfpOL6yrRotjoc7 Kvng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702914548; x=1703519348; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DCQzgc7HZIXkjhrSZNLJQoxchuiI/YLWggopgdNCG/w=; b=VFK5S+55OT+ZAY8RlGMmrzuYCgKfXfY1d+P5tcr41V2brZ/Y6wZJLzXG47jZN+7CMO v6K4ofHeUB10of1jp5G9dmlBb+iOmu1g93H7f6+m8pv3HRwxFC8VSFyauH/7mIC07z+e UmWg0FfA4hd4GAknV4RBB2eAOIhY9b+ze0hdcu1bC6VDuVSvGh15jir4IOM1MAd/2DMy JzOd3c+otwVHc9tFhHgycTDjba11i2Krkx+KAcjS4QTG4Fym/nZ2O6xDJifDzDj5sysS UQr/U3MJf6Q93pFHRbTo9l4QoNF79nG3yMVgiOQ2ySve4m0rGI63ilO7FEz3/hAeeY+h IwGw== X-Gm-Message-State: AOJu0YzruGAp0/rF/cPDN8NVoNa1VRv9Z9P10ncrmvF9QqxN9ZkFXai0 8ezbExcoEPuR5cbjsY5D3+8= X-Google-Smtp-Source: AGHT+IE0dLdHYhpXc1l9yUsJLLTeyu7fPpLWHCXq007NrPDn70yB+TVn+T7YKt5u3Yd3coevCH6ExA== X-Received: by 2002:a17:906:da08:b0:a19:a19a:eadf with SMTP id fi8-20020a170906da0800b00a19a19aeadfmr7048806ejb.152.1702914547563; Mon, 18 Dec 2023 07:49:07 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id v19-20020a170906489300b00a236378a43fsm654118ejq.62.2023.12.18.07.49.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 07:49:07 -0800 (PST) Message-ID: <410b116b-cb63-7ba7-3689-4f0832ab5796@gmail.com> Date: Mon, 18 Dec 2023 16:49:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 From: Johan Jonker Subject: [PATCH v2 2/2] drm/rockchip: rk3066_hdmi: drop custom fill_modes hook To: hjc@rock-chips.com, heiko@sntech.de, andy.yan@rock-chips.com Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: Content-Language: en-US In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_074911_000305_792105E5 X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CRTC size validation for the display controller has been added with Commit 8e140cb60270 ("drm/rockchip: vop: limit maximum resolution to hardware capabilities"), so we can drop the custom fill_modes hook. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c index 0dac6d133767..6dadd753985c 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -501,18 +501,6 @@ rk3066_hdmi_connector_best_encoder(struct drm_connector *connector) return &hdmi->encoder.encoder; } -static int -rk3066_hdmi_probe_single_connector_modes(struct drm_connector *connector, - uint32_t maxX, uint32_t maxY) -{ - if (maxX > 1920) - maxX = 1920; - if (maxY > 1080) - maxY = 1080; - - return drm_helper_probe_single_connector_modes(connector, maxX, maxY); -} - static void rk3066_hdmi_connector_destroy(struct drm_connector *connector) { drm_connector_unregister(connector); @@ -520,7 +508,7 @@ static void rk3066_hdmi_connector_destroy(struct drm_connector *connector) } static const struct drm_connector_funcs rk3066_hdmi_connector_funcs = { - .fill_modes = rk3066_hdmi_probe_single_connector_modes, + .fill_modes = drm_helper_probe_single_connector_modes, .detect = rk3066_hdmi_connector_detect, .destroy = rk3066_hdmi_connector_destroy, .reset = drm_atomic_helper_connector_reset,