From patchwork Thu Nov 2 13:41:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13443768 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 A8E9EC4332F for ; Thu, 2 Nov 2023 13:42:05 +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=MJJDbUgw+kWSsE8xvw9QaFZpJuYA6/bMoGJ19U6Il5s=; b=oBPu6xupK2C80b dGfh5DiDX9th2gqg1CpO494dFWrkI98jqJQ5gMNaMFIHEUrlGuHAKjFVWv2A8yUhen8RM+lq5KZ0y 34lGmehQElFmWK+mYQ64y7P3cciQHfX4Igd81ncgnEkPUXPrwCe1zm8NeCrMcEUWwTD1mCC5dCguV /XrXVksJsy5841LLrOAGBN+byhcZAjFfudaN6asQRgYQ61vNqNvDHrRARtrn5/YCaYDHh+2f52MSe b9gVaiuyUbmyhj9p2hpY4EYeFtCx9IuqqLDBP23arV0PUVkPaF1NLciHzlgmMjMZe0l8EzJw+EFwK QaVMztW4IfOLYYiP/aaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxM-009YO8-0s; Thu, 02 Nov 2023 13:41:56 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxJ-009YMo-2j; Thu, 02 Nov 2023 13:41:55 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9c603e235d1so137631266b.3; Thu, 02 Nov 2023 06:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698932510; x=1699537310; 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=525ntZUU9IDbVV4Jw2CWfdlqQxiLo8Ec66BuDOeD0GA=; b=SgCf33+HWXXCOJs5EgW0NnHL5P+o9yqCQRjL3ebqjCX8JEUn8GGTLmQzUrC0vi96UA 3ld6OJIn0dqOEelF+yaBA3Fl5Fpxr4NomXj/XZjFcLRaClK62Tg7PAB7VDF/naYUfQ4+ jN/8tmTo77369BvW7/7A35pZmuGgDlolSXFmDP4fKnpJzqEfO39hLY6ZgnkzIsWJfF4c MKjb1c12tLY/Ru2/+bNJ8rGIAMRQ6rvuC5rAc2MgAVk2XMT9+GEtpogfDg2n45boOCvy tkpXaQv/hXn3eIXJch/FO/ZAtzvtCrVBjtL9fB5UN0/HWEgfUDDFifBLQF83wY6rJu+d igIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698932510; x=1699537310; 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=525ntZUU9IDbVV4Jw2CWfdlqQxiLo8Ec66BuDOeD0GA=; b=QvqToY6EFZLQu/Gb8lJFOqfU9A0QBXk/Lsh8AO+FJIeSrUbEOKLibuYRLTFKzs8nJa S5O1B9k/AJ2iNzJEZQJ8MpyRjRHRhn3advzV9nU/GkvCF6V1ddQSHwE7F1EL/ZzTe3QF zebNGGhCP+FVZKveEw9w1LRZBpiW2yl7byKOS4pms04P9LuHSDn/NwGTL4oTojegXB7a 0WbyXStwYgGH7y5cOwkdQPTVam2PV9DVHa1oHVmn23wYoWwCsSnatarj67kzJQoqKFWT 04IyoQAFTv1JYLJHfbFGFldEEZOM2v1FDDPwA19LJbTUbHX1CYr8KJcN8u46EO3mxe6I dDXw== X-Gm-Message-State: AOJu0YziqurOu4C7Vget3Xxw+aA5ckKNCTs7sIg66hwp1CpfBpuFrTKu LuDOLJlrw6RacCHxgfSlePs= X-Google-Smtp-Source: AGHT+IH973wFt6bqHW7cDZN0wKW+UkKsLKCaRg36hSJokndjWn786idIO5cQuLHCEfTXF8UIDskt1w== X-Received: by 2002:a17:906:eec3:b0:9b2:b153:925 with SMTP id wu3-20020a170906eec300b009b2b1530925mr3895676ejb.21.1698932509891; Thu, 02 Nov 2023 06:41:49 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id hb9-20020a170906b88900b009adcb6c0f0esm1157638ejb.193.2023.11.02.06.41.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 06:41:49 -0700 (PDT) Message-ID: <5649ac03-db92-42a9-d86a-76dfa1af7c64@gmail.com> Date: Thu, 2 Nov 2023 14:41:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Johan Jonker Subject: [PATCH v1 1/4] drm/rockchip: rk3066_hdmi: Remove useless mode_fixup To: hjc@rock-chips.com, heiko@sntech.de Cc: 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-20231102_064153_882487_8862051E X-CRM114-Status: UNSURE ( 9.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The mode_fixup implementation doesn't do anything, so we can simply remove it. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 9 --------- 1 file changed, 9 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c index fa6e592e0276..5c269081c691 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -434,14 +434,6 @@ static void rk3066_hdmi_encoder_disable(struct drm_encoder *encoder) rk3066_hdmi_set_power_mode(hdmi, HDMI_SYS_POWER_MODE_A); } -static bool -rk3066_hdmi_encoder_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - return true; -} - static int rk3066_hdmi_encoder_atomic_check(struct drm_encoder *encoder, struct drm_crtc_state *crtc_state, @@ -459,7 +451,6 @@ static const struct drm_encoder_helper_funcs rk3066_hdmi_encoder_helper_funcs = { .enable = rk3066_hdmi_encoder_enable, .disable = rk3066_hdmi_encoder_disable, - .mode_fixup = rk3066_hdmi_encoder_mode_fixup, .mode_set = rk3066_hdmi_encoder_mode_set, .atomic_check = rk3066_hdmi_encoder_atomic_check, }; From patchwork Thu Nov 2 13:42:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13443769 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 6A061C4332F for ; Thu, 2 Nov 2023 13:42:22 +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=HlSBm/4hFFYPo6NOK2v7lGEeHOI+Nj7OJ8FXdufIbgg=; b=A2wF5uTk0/0Zye zMG3flAA4+437vB7D0LoSakQjRzm4T6vAap7kp6iuyuQoTTYLuy8a7LT4xvEjy+8mOXguDKHkRW9Z VaFvV2ciO9KfUeX2fH0dcUnUjUr4dHAOKkUZ2Zq8DsK9WhX5FaimOIW9SQNUIIvK976U9qg3klJOz P6HjR+sUbufEyIPKqp0XEbI6H4s/6tAgECNmXeLlLtkBzHG5amX4vamNo4ein4sgpIxDC+6TN/E5S sAi7j3ohNUZnJPCn+7lEaxglNOsICmrOwOn/V4LKJtKnpU4AIABdW5/cHqMSY6zlfTwvQS+dl6pot CaqGA8Gj91tkuIV1gFVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxc-009YST-2C; Thu, 02 Nov 2023 13:42:12 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxZ-009YQr-1M; Thu, 02 Nov 2023 13:42:10 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53e2dc8fa02so1558630a12.2; Thu, 02 Nov 2023 06:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698932526; x=1699537326; 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=lK/vWnmM0KVaM6vCg3VvvClqSJH14OWzepShm2ndJ8I=; b=c+f2Q5kBUzN+BSJ18IDlgFn3+5iWS6bnuz5Zv82ra/EUGDvaYs/N2qMOUFYto5FFYa 6pGLDuzpEJSBdIJEVUUaYjktlx91c5hpcz9vBAf4BFoadxyWBs6LLVHaCJkIsLz4JgAp FYNSrte5Hpn/BbYwAj3UkTUAd0RwZaRyJ4Hd6204avAVRUMAe62hfJI9vKiTcTXOTaUK 2ntm/r0fkg7gik9ih9nK4dcCdLx7TE62kfA0aUplbl7zMGEsfcNVFJ0RRq5GtiYRgwXh QL02gduU/2eAXmZmOvh7ZQ5/YsuU+UB7s8mfw35covbmltYqD/25DOGtdb05UwMeYV/G pNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698932526; x=1699537326; 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=lK/vWnmM0KVaM6vCg3VvvClqSJH14OWzepShm2ndJ8I=; b=imOSD5P1SczqlPe456H3ZLZJM88z0PL05XOvVtrmsCZfcGWXe2MJdWMzOLowyhqIZx ySRuLCPhO7uSnSYyoYUb4P3bpmW2vXodBVro3SqgMrPGzmH0sCEtlQ3bOEwutHZ1JV00 8dq+K1bzwRAe0pBO0yRT/jsvXCaSMeancXh+4GfC/98mn0YLv88NgX6qei/NTXXtc+EV NL+gG2hz6qED7uJzODVDWrc2bG4spMYgTLL6LqWKU0KkIIXqx3oTDAGx69E+dOQrSNua ScxSQ8BdAjgj0mUBpJJ9FPub+KXWTWgePshD9S4YOEuI83bRp7Ydjq2Dm5J8t1ZnlaSe Jmmg== X-Gm-Message-State: AOJu0YyoPgqlfygg9ohCc8KAdxNsj+8wJ9VVlsWCOr63uZ+KHhomnwuz RLJC2q26cmNp/ytoXTGG01E= X-Google-Smtp-Source: AGHT+IGV7tL5vnuqy+ywj5JlmDgSzOHEisn1VYUrvxqfFveF+L1CIsGQpPMLlZCZMZDql2U/Dza06A== X-Received: by 2002:a50:9544:0:b0:543:595a:8280 with SMTP id v4-20020a509544000000b00543595a8280mr7749934eda.37.1698932526017; Thu, 02 Nov 2023 06:42:06 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id q32-20020a05640224a000b0054130b1bc77sm2347915eda.51.2023.11.02.06.42.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 06:42:05 -0700 (PDT) Message-ID: <034c3446-d619-f4c3-3aaa-ab51dc19d07f@gmail.com> Date: Thu, 2 Nov 2023 14:42:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Johan Jonker Subject: [PATCH v1 2/4] drm/rockchip: rk3066_hdmi: Switch encoder hooks to atomic To: hjc@rock-chips.com, heiko@sntech.de Cc: 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-20231102_064209_463670_AF81BC9D X-CRM114-Status: GOOD ( 13.62 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The rk3066_hdmi encoder still uses the non atomic variants of enable and disable. Convert to their atomic equivalents. In atomic mode there is no need to save the adjusted mode, so remove the mode_set function. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c index 5c269081c691..0e7aae341960 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -55,7 +55,6 @@ struct rk3066_hdmi { unsigned int tmdsclk; struct hdmi_data_info hdmi_data; - struct drm_display_mode previous_mode; }; static struct rk3066_hdmi *encoder_to_rk3066_hdmi(struct drm_encoder *encoder) @@ -387,21 +386,21 @@ static int rk3066_hdmi_setup(struct rk3066_hdmi *hdmi, return 0; } -static void -rk3066_hdmi_encoder_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) +static void rk3066_hdmi_encoder_enable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct rk3066_hdmi *hdmi = encoder_to_rk3066_hdmi(encoder); + struct drm_connector_state *conn_state; + struct drm_crtc_state *crtc_state; + int mux, val; - /* Store the display mode for plugin/DPMS poweron events. */ - drm_mode_copy(&hdmi->previous_mode, adj_mode); -} + conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector); + if (WARN_ON(!conn_state)) + return; -static void rk3066_hdmi_encoder_enable(struct drm_encoder *encoder) -{ - struct rk3066_hdmi *hdmi = encoder_to_rk3066_hdmi(encoder); - int mux, val; + crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); + if (WARN_ON(!crtc_state)) + return; mux = drm_of_encoder_active_endpoint_id(hdmi->dev->of_node, encoder); if (mux) @@ -414,10 +413,11 @@ static void rk3066_hdmi_encoder_enable(struct drm_encoder *encoder) DRM_DEV_DEBUG(hdmi->dev, "hdmi encoder enable select: vop%s\n", (mux) ? "1" : "0"); - rk3066_hdmi_setup(hdmi, &hdmi->previous_mode); + rk3066_hdmi_setup(hdmi, &crtc_state->adjusted_mode); } -static void rk3066_hdmi_encoder_disable(struct drm_encoder *encoder) +static void rk3066_hdmi_encoder_disable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct rk3066_hdmi *hdmi = encoder_to_rk3066_hdmi(encoder); @@ -449,10 +449,9 @@ rk3066_hdmi_encoder_atomic_check(struct drm_encoder *encoder, static const struct drm_encoder_helper_funcs rk3066_hdmi_encoder_helper_funcs = { - .enable = rk3066_hdmi_encoder_enable, - .disable = rk3066_hdmi_encoder_disable, - .mode_set = rk3066_hdmi_encoder_mode_set, - .atomic_check = rk3066_hdmi_encoder_atomic_check, + .atomic_check = rk3066_hdmi_encoder_atomic_check, + .atomic_enable = rk3066_hdmi_encoder_enable, + .atomic_disable = rk3066_hdmi_encoder_disable, }; static enum drm_connector_status From patchwork Thu Nov 2 13:42:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13443770 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 CFDABC4332F for ; Thu, 2 Nov 2023 13:42:36 +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=s7uu5uZCyqLMGQgsmGv7wRWeq2qZs3m+VHYYMa6p7LE=; b=MwJ0e5CZcXM67N 6YGM1DR7oy4rqTxGbgporLea35MgLz9CUfCivlTQ8OpIQeII4XPvYiAXiXKLMncRFl0p9lm3s/71l Y9v4HnpXielRbiuXR8J6G9zY/STeiIm4UXRH+GLxb5BcATZH2SzhQcLIxl22SGPkr9Z5ys55DBXYV OEcyFukPZwpWc1nE/Zl+txesXf+Y3yXsOsoUe9eFO0+/NxuWHDU3+rRwfMBN08BsAdyCaFLL6dxr9 JbQFBt2M1ydZAgVAuBYLzjIiPibThGxVg9urGyQShk7e51es/RewiZcZ7bR5fr0yEzlx2tJLI1PIb 77/yGmn8oldd+/fQAUyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxs-009YXz-08; Thu, 02 Nov 2023 13:42:28 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyXxo-009YVV-0w; Thu, 02 Nov 2023 13:42:25 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9d274222b5dso152100566b.3; Thu, 02 Nov 2023 06:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698932540; x=1699537340; 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=5ij4W2R7Rk89TAWTRo2Z11H1sJFKrF9K18A1hdSCONQ=; b=SWTfWDKOvMfUPTvGKxvlGHRwxQ8vr00Z7j/6EzGbKB7uKrabufpRyVTEPsYkJUjQxy 9CYTmNie/M+N9uc5VXZGD2c72zJ038WitUuB5iAy3dAHMp1pwIn1kP8JQ/TSQizfxEBF NVdfRiyIs2uSKqQb5wLKfkd6/WbmGJ98scOP3bDHgdSmg25ucKciII+AoAPesHMiuTzh OgXgKCTIUIzKMXhaE0NysxLfnbOA/xuJnkyOrhU4gnA6Rp7ay4W76mU4zIUJNKSYv960 C2oAX5fK1+vaasQ24XHb3gS83RgSt2DStSC7NeHyl+zSOA1th4xHu9E1tMHV+G6/nK0p lU/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698932540; x=1699537340; 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=5ij4W2R7Rk89TAWTRo2Z11H1sJFKrF9K18A1hdSCONQ=; b=HLezOx6T0e+1km0s10OaCaUOYo6qlb4RjxdNQwRrds/Z9QTFH9xr5ZRsct1YNdxVc2 LvQzR1PY+TJIQtGRwrSBCgAPBjUf9uV3YDBAH95z2CeL+igpi349LLgmjkmJ/48lWEot Qf/CnwZJUYbjXkuEyvsB+lFVUbCS1ktOZjZqIWoCzwp7zXI6tAp4p8YRK5h05VtzVAO7 5R1qh0v38OcX/mZr50ORprTyU4bzPPGJYE/UVdn6c4lpQn0ogMbQEznqAYzzHU93PBtO vTWUdaYeDdK6kowQu9clPj17Nq3NkA1XSwVvMtjo8+pxfsBAFLRhQvjmCR4vznEMP6oz Chdw== X-Gm-Message-State: AOJu0Yyk7KpbOvwww8VRLguNmhrF+5nq/bCw7d31OvCTphFpWNXAlqqU 2s73NrTo0IyTIwBsmYKPOVg= X-Google-Smtp-Source: AGHT+IF6LP+ml1ogEFi5qh8KFdD9Bqg3MegxZWCzvRijCiVmpR9CqHGHL0atdCUWnRBs0neVN5QPqg== X-Received: by 2002:a17:907:60ca:b0:9c7:4d51:af08 with SMTP id hv10-20020a17090760ca00b009c74d51af08mr4508255ejc.43.1698932540595; Thu, 02 Nov 2023 06:42:20 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id j8-20020a170906278800b009be14e5cd54sm1153220ejc.57.2023.11.02.06.42.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 06:42:20 -0700 (PDT) Message-ID: Date: Thu, 2 Nov 2023 14:42:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Johan Jonker Subject: [PATCH v1 3/4] drm/rockchip: rk3066_hdmi: Remove useless output format To: hjc@rock-chips.com, heiko@sntech.de Cc: 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-20231102_064224_331576_93C45F07 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Rk3066 hdmi output format is hard coded to RGB. Remove all useless code related to colorimetry and enc_out_format. Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c index 0e7aae341960..f2b1b2faa096 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -23,8 +23,6 @@ struct hdmi_data_info { int vic; /* The CEA Video ID (VIC) of the current drm display mode. */ - unsigned int enc_out_format; - unsigned int colorimetry; }; struct rk3066_hdmi_i2c { @@ -200,14 +198,7 @@ static int rk3066_hdmi_config_avi(struct rk3066_hdmi *hdmi, rc = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, &hdmi->connector, mode); - if (hdmi->hdmi_data.enc_out_format == HDMI_COLORSPACE_YUV444) - frame.avi.colorspace = HDMI_COLORSPACE_YUV444; - else if (hdmi->hdmi_data.enc_out_format == HDMI_COLORSPACE_YUV422) - frame.avi.colorspace = HDMI_COLORSPACE_YUV422; - else - frame.avi.colorspace = HDMI_COLORSPACE_RGB; - - frame.avi.colorimetry = hdmi->hdmi_data.colorimetry; + frame.avi.colorspace = HDMI_COLORSPACE_RGB; frame.avi.scan_mode = HDMI_SCAN_MODE_NONE; return rk3066_hdmi_upload_frame(hdmi, rc, &frame, @@ -329,15 +320,6 @@ static int rk3066_hdmi_setup(struct rk3066_hdmi *hdmi, struct drm_display_info *display = &hdmi->connector.display_info; hdmi->hdmi_data.vic = drm_match_cea_mode(mode); - hdmi->hdmi_data.enc_out_format = HDMI_COLORSPACE_RGB; - - if (hdmi->hdmi_data.vic == 6 || hdmi->hdmi_data.vic == 7 || - hdmi->hdmi_data.vic == 21 || hdmi->hdmi_data.vic == 22 || - hdmi->hdmi_data.vic == 2 || hdmi->hdmi_data.vic == 3 || - hdmi->hdmi_data.vic == 17 || hdmi->hdmi_data.vic == 18) - hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_601; - else - hdmi->hdmi_data.colorimetry = HDMI_COLORIMETRY_ITU_709; hdmi->tmdsclk = mode->clock * 1000; From patchwork Thu Nov 2 13:42:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 13443771 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 36981C4332F for ; Thu, 2 Nov 2023 13:42:48 +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=yBrtYbqvFnXXK6y3NvfCKnmugR8Xz9WF6BxtnsOo2XA=; b=limuwn36OCiPaW J3jYVX5P4wo/S1MbCWRdb42Aq6tP5Vy6oDEG1Ae4u3mm7aHctyOHmVeCPaaxkJHDSoZPnSJEu1S8E do6j4RM4Pn4sWc8K/15ddkfFgYub/JJEg/KAbO9nso6MOyaU/0BC0/WOv+79QWEXgWgpgBrbRdAGw S4GNHYRsVhajLUHr/19jkcdu/u7FNAjBq+DG0ZenfnG/hv0PHylVo7GD4gZfWItsPa8/tAgvN3mG9 rIK+DqtSr6+VQip2g73uWPpy6CUXERXZnpNfRO7GUfLcjKhsTU0X0Qxa6UXO+yMXJ/FXyH7K1iuvM XvO7na4uj2/JRPpEQ5rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyXy4-009Yc6-11; Thu, 02 Nov 2023 13:42:40 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyXy0-009Ya8-1V; Thu, 02 Nov 2023 13:42:37 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53e2dc8fa02so1559650a12.2; Thu, 02 Nov 2023 06:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698932554; x=1699537354; 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=mtT6nxgsYYS4sdsaY7t86FYZfBLOlduBaZpsVAIl6mA=; b=GK4SHirQJ3UKo0/2yQZ5WWvfFpcpdnTL3xPIGtd1fOgmCf0YbtI7zY7bfMzc5DCw3v Lu5efuRoy7xjpOGhgErGMBXdbLAnntoO08vDdHaQaMCz+dectIaLE0AzRFTA0PHNUw8r 7RdVZtudJaxYSowyim7Eqga9cLbAQXQk53gZ13LUYsLRwC3HlREAFfV0Nhj2y6A05iOi EKuTqJFdm0uxMvnmwkAgmPoQV+G4tH+Nqbw9dq8gw79QXaqUNIe/zW/SSoezz7FJjnVS 8B3wNGi0f3onJzZZ5IZSl8a1lQRunICNzYfHsopHT68Hp5KKZPmeteKuXeb5NS8LPNpv 0m6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698932554; x=1699537354; 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=mtT6nxgsYYS4sdsaY7t86FYZfBLOlduBaZpsVAIl6mA=; b=rl6qoghZ0VuIZBVIbLxGcn+1utsLe1Q1EUgAzvkxi8QjXCwieAahKlXjFEFURvy7Hj AOCVW7OrGAqa2xTCAKNY+hurZfUXcecZgpxeNI0pETpkefO/yM1zgiBAJbScjAA1yE+e Y0ZOk97B0tvARpW96MwJL9/Gew0pSCd9ahh0WGVXuKCt1t2CGHsj6IfIcc3yfYZX4CkP TBs0hyCCDVrRUhzegbrPNaG3eYs4gQriXNbunrqal+t0/VGZPJvPknrnilolfk08A0PZ dUOkZWUW7zb0Ms1nM997QwS2TDFyg/cpB1hQstfEV0PI1uzNMy3NNbKYVEfpEDuL4/Gy XsqQ== X-Gm-Message-State: AOJu0YwZ3NCzUxODZZ+2gtMruPYBTygkDUhhBCC7n3nyiZ9V1LRanlZk w6l2+k7xgStb6LV72toeQLk= X-Google-Smtp-Source: AGHT+IGhrHVKX8Mcwu1ULzEU38/CACnkgTDqYLqxetznwQ5sVClFv+wxqUtm2VH+CqBwnOqPQHgfDw== X-Received: by 2002:a05:6402:2029:b0:53d:a7d9:5149 with SMTP id ay9-20020a056402202900b0053da7d95149mr14483614edb.6.1698932554131; Thu, 02 Nov 2023 06:42:34 -0700 (PDT) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id v3-20020a50d583000000b0053e89721d4esm2378618edi.68.2023.11.02.06.42.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 06:42:33 -0700 (PDT) Message-ID: <813a0e30-a61d-7fc9-9ca6-11bf9c6fbe52@gmail.com> Date: Thu, 2 Nov 2023 14:42:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Johan Jonker Subject: [PATCH v1 4/4] drm/rockchip: rk3066_hdmi: Remove unused drm device pointer To: hjc@rock-chips.com, heiko@sntech.de Cc: 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-20231102_064236_505194_5A6ADCE0 X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 --- 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 f2b1b2faa096..c51520ec58d2 100644 --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c @@ -38,7 +38,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; @@ -734,7 +733,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);