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: 13443763 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 4BF94C4332F for ; Thu, 2 Nov 2023 13:41:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADF0510E8BB; Thu, 2 Nov 2023 13:41:53 +0000 (UTC) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2C7C10E8BB for ; Thu, 2 Nov 2023 13:41:51 +0000 (UTC) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53e70b0a218so1627769a12.2 for ; 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.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=525ntZUU9IDbVV4Jw2CWfdlqQxiLo8Ec66BuDOeD0GA=; b=VSZTcq6iBrVzla8h93rtVURWR9YUkwcVfVUnK7Pq5VB+WFVJP3nJny17mw+2jOrcvA q2eUR1NqJdUe5RxId72fo3JTPFff56jWm8XPRA3+poEChiCI0cov31HGsyOMUXp1a0Gb NlsL1XuN3/fp3ZkhIf8wWq5Gbzjzn6W6PrCT3VJkqvztnXatG+j7aV8uSV3wpGP8DWH0 x85l+6zvr1zk8ppm2AyHgXH2/d/O8wjz50x6S5bVFvflaKij/Sp4qhgF6vv6TEE1at/q UZav1phaCP9DBhXOaVXWyUk3DH3Z1zvEqlfTHPzk68qdpp8ALhX91HjBdy0yHCZzievK cZEw== 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=GO25oqvDrPjf/1hc2EeKDj+MZ3Hjh/JkBcSfnud4HPIBke8v3ciEtH4fKCg8wimk95 61lLxYYVYlUC/0rBZO4HUYwSoxQvifrmu5KTkT41JyHIs68cNJjb2r6pROoeJiYXcErW 2mQHyIBj3HxDlzXf641VIiFxTEBfE9VfbLO9yR2WHrmeWgdPJZW70rUiG+wOZ2BCXRyg RRpI2oFgCBJHvmYCl9/Em59pJ0JoJaWp26AWX3EXBvlsuf8beDcbQSU2H5G0NeG2qBKP G2xQPdxkXlDv9Z7aVFbbLmeiQhfhTXE5hfOCf2R+0UHaA65yF+ACY/YPbWqJqZalIdLy g+bA== X-Gm-Message-State: AOJu0Yz5nX2xCHTf2uYbAtSwip/dYHzW1JOKxLfZwFShRnsbow3oW2nI gw/BF3X+0VQKPIO+rLmSr74= 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 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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13443764 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 6F78DC4332F for ; Thu, 2 Nov 2023 13:42:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E0BBC10E8BC; Thu, 2 Nov 2023 13:42:09 +0000 (UTC) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB34410E8BC for ; Thu, 2 Nov 2023 13:42:07 +0000 (UTC) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so1580959a12.1 for ; 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.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=lK/vWnmM0KVaM6vCg3VvvClqSJH14OWzepShm2ndJ8I=; b=SiBZoPZI8+eQc+EqWJH3bkGGj1S6xdCLuV0rkS12qNHx79eqFQwybxTVhulv0cKS5q Saks8pulRwzUA0JrFu7e8tkUk6LKlbDyu7VNDng1K3llX6fjZaHn/nPdJYJDM4GN+J+W 5r8tOADni29i29edOzdSzQxT9D8LrenjByr1VxgUlrHrnCTjFRt3jJq9UoG8fQa+373o ifHygL3DsxmYEosabUCmIsrbQg2iubv66HlSONNVQvRmika4mSxpp4JiVxbEe/48D4o5 FbddHywbhGhxSwtWSZ7nNBv7Y1yeVqgsaFCdzO7Ga2rbP8AI48dfdo0D/IKw7K4D6EY7 JQtw== 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=YYRdLKo5tauiqO2AZ6qGwcOCJvXIeLXnu3mlZccGzt++45bxgM4i09VpICM9IL3oJB DJrC5pTmHhnGqHy7I9FM38cYfB+DoUO5Az+KMojTdeU1/SZvLWUIoyZsWQVckczu2OzT HVfgVvaX4xBgZaTGuDp0mU82ExVqnP9vCsb/dKWOdaSbtpOgksshcZpzBGXHa2pgcq8/ QNyMw0ZdK7vbn+flxCtviP41KessqiJIA5x89LlBSl+DyRoZGPJxdPZVGEq7mf1g9gL+ 3tG2D7nAubQsGnA6x1E7eGGSfrciLd6zRjGEkOyoJm3qZ2rhMJTX2T+1hrYlvgv0muUD VetQ== X-Gm-Message-State: AOJu0YwDcQWtWksbwjIeQWYay+unbEXqHaVSkSQt4Tv5AyBAlnFgZ06Z DDD8PHoGGAkIdf6CM50kuao= 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 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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13443765 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 205FAC4167D for ; Thu, 2 Nov 2023 13:42:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72A0410E8BD; Thu, 2 Nov 2023 13:42:23 +0000 (UTC) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A2AE10E8BD for ; Thu, 2 Nov 2023 13:42:22 +0000 (UTC) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9d23be183c6so155550566b.0 for ; Thu, 02 Nov 2023 06:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698932540; x=1699537340; 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=5ij4W2R7Rk89TAWTRo2Z11H1sJFKrF9K18A1hdSCONQ=; b=MFwOfiDaxmowMkLvve3m/xFiLlP7OL2j5FrdO0C0C4yzra+yCSLTREHRLpOgJMba8p tXJ0SsGrfiLL45PtkyvblUqkuF+3AwY+KBxHO73BdYUaWWObPBOKN4a9k7Ca/QoLeWwG IsQsQNJaKWOou64k7bEKgpzKjoYcGiwkpUngqir2vZBZ+LsrHP56ZnYYUYGvXpKzs/4G 991ir/6IlQvrtPaV7GfbKI6RNGq19pDVxMDWoWor3A1EX0em7LAxMTvnLGaXEPHWLeTu KUu0fcC2xepgJaVvKXLmTyvkwUoYD7W4BhC5yKqFOzJtQW3JDlguKMid5h85xSF9QTWO BhMQ== 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=fBUH4/lSPnO5uWMujdOdXyGLj3DOTWWqopfWs9QgpR2PWOJW3y6zjHqZHV3dkFsoj0 DN59sFFLNjZqoP8nVmrBHsqYFmPZotrLXmEqVdvnXd6oeWtTtgJ9fmjhPtLctOg5ytCk A6EmtSxa/CzUMvSA+UoISwL+tP7aHRX+H58eF9vXZEp1QblsN8S/UJjDwQ1pNRzNWqAd Q8ZY3BFDZ4TPgLR9CiKgH1cHIaG2SJ4MTU3GG5BFpslmx6LzOUiqxGZ8fZ1vvt9fpRHC h8S3Jz78G6Ismf/0VQW21JA434j0bQoCop4A8y6z8rV4xITapiE3rYo3wv5IuGRc9dLu Md1g== X-Gm-Message-State: AOJu0Ywn7IA6Za0BmeUVtTr6UBR6IdvvjFNHp8EJ0RzluxxqY78TKvcz zM4vgeQynFQue/m03E1+WjM= 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 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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13443772 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 4EEBBC4167B for ; Thu, 2 Nov 2023 13:42:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAFC110E8BE; Thu, 2 Nov 2023 13:42:37 +0000 (UTC) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4FAD10E8C0 for ; Thu, 2 Nov 2023 13:42:35 +0000 (UTC) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so1581900a12.1 for ; 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.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=mtT6nxgsYYS4sdsaY7t86FYZfBLOlduBaZpsVAIl6mA=; b=CWVw5LO5tBjaLQ890K5paiPpMq0k8O8d6CuF0Rzs9GX7QvjDwprsKJSuUkBuqn+uGj TyLKWNOcR4HZVa6mpApJ16UB06Xkc/xcucnSJnX3efl6yE6sFWkeIzAzgrduJhILmc8o zw/pb5Kvw96BGl7i51qx80QDC7Nubq0xqgbDQ5NFw6BwJ0eIpk/ljjWO58AwYW/AiG4e AFktWCGAvEanuCmTudfRGocR9zhRqStdI86LKbXyG76icVDN7Fye9QvTxNfiS4ciXZ1B Q5i1GSw4qgXQxzrSIm75tvJF/r5Hd9EIMucvuyLfYCX0VfZplYZ3VqJGNUABALlfZtbB JqWQ== 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=Se+9jO916GaUKUC6ARHrfpc8GfywvCaBSn3c1NfOzRaGUQMsNB/X18JSQ6cPk4vzUu 9DLtS6aX4khf2P8rf7OGtXWJNetuMiTo/JX3lvbXs5OgGqJEH9ZZYGyWPDRAJZohIing 8tRLuK4JTAEt1Pj3QJ1N1/VTGnsMcfweOQAetVyNgF77YHKYKpX0cyUTuzJ9lLG1SSWM TdCa2WNQY73ZedgWYC7iPeM04/M9NfqD15fN4j+fDI1p4Grg8XCyWrDdTxZvh5bUAHeU EObYkqqVIyiZv/uQy1Qbf1nuG17FH/TZKTq5X/lm8xjKLbxxdi7qsMiRzYeVtYiqYEF1 9ABA== X-Gm-Message-State: AOJu0Yxe79Htn/C0y0Pu326XP6b0ZvTpbuNpBHZXx+YqbUeThtjuziuu Fknmxy7bnO3pKwJqXwA1lTc= 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 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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.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 --- 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);