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: 13497376 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 C59A8C46CA2 for ; Mon, 18 Dec 2023 18:50:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E944810E3C7; Mon, 18 Dec 2023 18:50:46 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5A0110E10A for ; Mon, 18 Dec 2023 18:47:52 +0000 (UTC) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-54ba86ae133so3171840a12.2 for ; Mon, 18 Dec 2023 10:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702925271; x=1703530071; darn=lists.freedesktop.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=cGWHcLPgxj6BQzB24GdaBjVgOTFwyPWAYb5zJxlTwpxiOGgP14u5wZw+NcnJsFcJA4 fu0XUEjksLcAxPe/SgQ96jM6x95P3dTyw+Mh3IOcCZtQPtug5ynxMNhgdgdqBNRCnOPq Toe82ZWqfp63Zxj7mbUbguTnTQquwaftXzeQ/KFebAQuhU0Cskxf0SDbZeo9xh7LKVnL KBf/z0UIdlgYhbgtxjdBxlIb+UP9IY7ye7DrO2NWP+z6Y2ey5AEJ9beiTOIZKkvK293q 8rqlB9h/GJWyXyucEsXbzAxDKtBzCTXCB2cU05jbj46OA3Bb5brFmK61UrjmfLCjdsLf NNgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702925271; x=1703530071; 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=gAaMcyEFIEINzpVb8wPVlerFmbqoez+NLAkMg2NwNkcdLTl2OEXfRsjp1lAI8edngf 27OV5v23WH8/+jkV7qPFEPPvssyFU4CoF8dL8rAjK3ADRdtDalslbHmGB7/6Rijhi3cj 5MhYQIs0qWp7ZsjXX+qVQ5wkgY6KhwEdZrYRcpSb95nL4SYcuPb9IXVn8hJlXI6wN/BH FCp2WkIFVqIbsz0U8uWA6neZoPLQlW+GjV/uHhJGX7uUZz6K47s8ihCzUQpI6hjD/V7N KvMRwZXv7zqA/jyVD5HJL/HICeaGPDsP2qqIJH2KdQrSF6gS1y0WVQOClVoDBQFdUhh0 DQmg== X-Gm-Message-State: AOJu0Yz2CNuMp8LUxYa/2Q58hf+zpt+feh8IB/vXt3ty9LP55WzCVKL4 sNxb/3BsZIzSVB11VJ/CJMhm4Vb3Xd0= 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 References: Content-Language: en-US In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tzimmermann@suse.de, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, mripard@kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13497435 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 09B3AC35274 for ; Mon, 18 Dec 2023 19:00:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 71FF210E3F1; Mon, 18 Dec 2023 18:59:47 +0000 (UTC) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0329710E2A1 for ; Mon, 18 Dec 2023 18:52:23 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-50e2786e71fso2994043e87.0 for ; Mon, 18 Dec 2023 10:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702925542; x=1703530342; darn=lists.freedesktop.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=Iz4vSDRZzE8JXpYiwRNCFpbvg2z5R/U/elBbgnjk/6y2OS1eJUhq6cB7Slfllqr5NV KncOBQ3J/G6T9UteoMjQC714vTFPAViaL918z8UHYsKzs2X7TCwiMZDWjIyBFlRplrR2 OyErVX3HILqubV6VkQkywjgsRB5zCNXSXtevSCnril5v4L3oXaS23hdOYUmg3ySeryMD qzF6vFVqubUZX5pX8umv/UfJnULuPDj6nJSKjM93EHNEswMLd8DCm5DlI84k4dO5ACwD EQY7o08AFWE+dFbBIy8ar3IsEN3sAQZST+nPnnRwjAc3lQJFUJeHOIOUkB+cFtg1EjNb GfnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702925542; x=1703530342; 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=GRaNDBcr8f/QlzdxAOsnjoh2Zj10/OF9h4o2Y9thEoXWKPz42WkHClof154p9jZgSW Ix15UyrgHWOiwj6sAFRP6mnDq7CaheJbsfCXebGvPAcFFHUXrWsNqk1ccSc/92ZsIKsy /3SPwoxe5HHuXTPfsiGB67awFk2JTOtUKLGcaAobAnbwSGB2SIPcQyqRmV2JTF9N9jlf HVNgTfbpzOX44/xH/oqPm2ddZtXQCr7Yj5Fkug+ncW8XIEBQ6zPa7v2ezSF4danDNUYC G8Dd8xji4dRBAr4dzI5Tjyvn5Ebig7PfjNuHaQDO18dB1+1j3oGXuClqoKizBWGhdThf Ev4Q== X-Gm-Message-State: AOJu0Yxeiq4ziCXe1tYEJjJhSEsXGm+Xcc86YtRSiKpuAfPCdCd/j7BF 8rmG9soRNuZOQYBxrL1opZrA++Y8NT4= 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 References: Content-Language: en-US In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tzimmermann@suse.de, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, mripard@kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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,