From patchwork Sun Nov 26 10:56:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 169858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2405311vqx; Sun, 26 Nov 2023 02:56:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcA8/yQEIS5Fuase9pcckHS+uNOIdt/x34aNT6RDQiuGBI31Rho2VrIllGJaSJnCIYKTxv X-Received: by 2002:a05:6808:3c8a:b0:3a9:9bcb:8760 with SMTP id gs10-20020a0568083c8a00b003a99bcb8760mr12362915oib.39.1700996182362; Sun, 26 Nov 2023 02:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700996182; cv=none; d=google.com; s=arc-20160816; b=BlAA+KMACkNfeqfvpT1TM6Ctp5wklySu2X8s072kU96VF3Aiy5azs2kw4KMZzJ2Ua/ ukLbRi3nCZG1VGd5mVENNh4SGeFcrl2gJg1Zuf2rAjGoddMIwQ2Ov6g+ZgA70qtE7rwO Ercyu3lEv15+zNEPMDa/5+2Mt0gi6CMxlVCzbe57EIiVSTeeMULLJF9/aGrwd8Gpht0k hE+ReGAteDlqLlvj1ZUn/HZJfoDz5md9IHToySrMemcaMUmzThVJ+siVnyArIs9S26xZ LbQaqNHlaH/rahQwGWKXxGJ7/Zefv5MqTIVMvI1whkKqmY3rTamWYCeK1r2yTUOwyXPM 9+FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=mN5h4JeQlyNJ6i5AWUS6aIyGqp9DnO+inxm6CANO/d4=; fh=A5txN680DUrn+7vP1vJQ1x7h0qg5/DBhgY7UdU6iTTY=; b=anbWvToYUun1Gi9RG0H8YJK/RbCI/eB9LXW76MyWXHsaqF6wRKFv90TLDC+0iju8XR H56TP+GOL7rwq0sPw9Bo8ljbz1UPaDejhVfk4KC9g/Zp8DUXtqnuFgoMBvjks8Nbt8tn Afy8a80z3/KaMZ0bKfaykmKgoxupyEeMvM3cbPBIbLdIxgXr+GZBXcL9mP+912NDVOzU b6xDsn+Jar3sArP5bjlBxYYGWEXyz8YjvLSa9VJaH81c42o/NDg2xXn64F4CNebWR1Kk +Xf4XTnjILu3EIg22wNBUyqFsbsbS3JOzqF5KSVULQ4wS0+WhdN8eVVBUuXIqk9I7REU ASug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O9MjvXUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id g8-20020a17090a640800b00285ca776886si135433pjj.171.2023.11.26.02.56.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 02:56:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O9MjvXUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 618CF8042707; Sun, 26 Nov 2023 02:56:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbjKZK4J (ORCPT + 99 others); Sun, 26 Nov 2023 05:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjKZK4G (ORCPT ); Sun, 26 Nov 2023 05:56:06 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF4E107 for ; Sun, 26 Nov 2023 02:56:12 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-54af4f2838dso2658309a12.2 for ; Sun, 26 Nov 2023 02:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700996171; x=1701600971; darn=vger.kernel.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=mN5h4JeQlyNJ6i5AWUS6aIyGqp9DnO+inxm6CANO/d4=; b=O9MjvXUkB7D+sxGe7RxYaJa8U5uhZPM7TfIkSyf0yWYq0gLe3/RL/62ChmBqrOvQUt 2nWGYD5JUjHQAvGPTaHtAzgCC8xXF/uPjiaqHGXMhQhvW4paH3pLENT4lyCRjkrZgPBj 16wAuyb+CuSA8HkfhdPPULpkEsXUCk4F+N7Xni8r0nDqUJYH6ePvS59VQxZSsre+ngXz QZxXnsVilDDXl9vJ3R2Mc0aNWgCAE6M7jCgwnzfNsZ+urZo7ZhWXyra98cmOOg4ljJdK FfSF/v6LRwuQ3ytOEGLQeEF6VbTAnz7+UWkY0TgTh6d1vdAchGYlsc3UqALtyvvWZk7y kCHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700996171; x=1701600971; 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=mN5h4JeQlyNJ6i5AWUS6aIyGqp9DnO+inxm6CANO/d4=; b=s05eZnPpYL+BfppIcYzTPL+MxcE2SqRwYBKrZxepDNZnogauHvH2uw/6FIoXO6b9R9 fGd62jIJQuwd/4xh5YpromQq+x/Vd83/vxDGbFtx9UsaRu3mmYtuDmX81weCD3HqqqjL TpbuAsFmBqlKqn3Zx4lKJ6zhPFpyjV660v7w7vW9Ngenn3gQGbu4qn7c6nHHC/O3LTuC 2XNOqutq3wGp9BOd40jaRfvK+1cVrEwHlB/J/ys51GyRDiYdUFUJh5jxgBrK8Y9p3SS6 XKWMlYtcpWjKhdyFRaqmTeYJs/NXqjsU/94jrL5Z8SoVeG/8TiabwvlLiEsfc2T/0AKG V9Aw== X-Gm-Message-State: AOJu0YxsMNY/7kuA9R83XDvlU9D/m1vfgeLtoxn+fQK2miKB4DpV6MA3 /ltSMcUijC1IqFOlKC5Jzew= X-Received: by 2002:a50:8d4c:0:b0:543:5c2f:e0e6 with SMTP id t12-20020a508d4c000000b005435c2fe0e6mr5900684edt.17.1700996170898; Sun, 26 Nov 2023 02:56:10 -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 s25-20020a508d19000000b0054ae9d77989sm3281586eds.64.2023.11.26.02.56.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Nov 2023 02:56:10 -0800 (PST) Message-ID: <1ae0d08b-4f99-39a2-d692-d0cb1efaef7e@gmail.com> Date: Sun, 26 Nov 2023 11:56:09 +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 v1 1/3] drm/rockchip: inno_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, mripard@kernel.org References: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> Content-Language: en-US In-Reply-To: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 26 Nov 2023 02:56:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783623772913991673 X-GMAIL-MSGID: 1783623772913991673 The mode_fixup implementation doesn't do anything, so we can simply remove it. Signed-off-by: Maxime Ripard Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/inno_hdmi.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 6e5b922a121e..cc48cbf85f31 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -517,13 +517,6 @@ static void inno_hdmi_encoder_disable(struct drm_encoder *encoder) inno_hdmi_set_pwr_mode(hdmi, LOWER_PWR); } -static bool inno_hdmi_encoder_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - return true; -} - static int inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder, struct drm_crtc_state *crtc_state, @@ -540,7 +533,6 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder, static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = { .enable = inno_hdmi_encoder_enable, .disable = inno_hdmi_encoder_disable, - .mode_fixup = inno_hdmi_encoder_mode_fixup, .mode_set = inno_hdmi_encoder_mode_set, .atomic_check = inno_hdmi_encoder_atomic_check, }; From patchwork Sun Nov 26 10:56:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 169859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2405432vqx; Sun, 26 Nov 2023 02:56:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8qsUs3kyht0VjPxN3EzpMCRb0m3aZ61gzhUxFAqepQ0/YcVcnZeiiPHbwjzNnQUiZpDmj X-Received: by 2002:a17:902:f550:b0:1cf:a5a0:5f85 with SMTP id h16-20020a170902f55000b001cfa5a05f85mr10237137plf.25.1700996207918; Sun, 26 Nov 2023 02:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700996207; cv=none; d=google.com; s=arc-20160816; b=ynmEfUxbBjknWWg2hYtYxhA+pf8yIVWjgJU3kWww22MsA0BdgSz95P2MW2pYQsqPX/ muz30phkcDA3ijKClphMLANIhc+P9N2vu0b5WkECgJPnSIMrKV/ywqbPZl3WtP2rAh4w FuF6Pfa1rTru4SBwM8acZQgFiPerMjNfxMWJ0/0sM1z6bmjFzm9JP4Nl5Ih52rCc1W+j 8lCBbHkJwxMkA1ty20MGhvNRMl9cPDR+jb5ZpeqD9DRALZ6E3ceLqLhnlKN7984M2onN pZO0HV3P3xPezKS14hm5THLQrnIzQEN66M9Ed+in/Voic33OlWRIRPhzVGo5HZb0oPA2 WVEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=I3GW50siPE3V/OZVTf7EbN7pnDFJwfRoAQudNo2WQ48=; fh=A5txN680DUrn+7vP1vJQ1x7h0qg5/DBhgY7UdU6iTTY=; b=UiwG9/B3CUnCgFeFIO0pXrC1GZfEbCfN2DsZ5MnfedJwGEiMeaVRyUKhmakgOa4dJL W3SWxEtxf9dxOJilnVUVPi1q95pfkySObfU53b/vffDtz6hvULEZTj1FjOENxXq/XUqq MxUfFo66G0xW0bqIZ5zEn7xqnzggmvB6D9H9y43mjhBsidqaUDZ5pkXsHjRrOKo9ayCv 11NqqQnPazRgQGUp7kUg5RkDkII6AJ8TDpfNEQVojE2X5WbO1tGqGPAoqGMQgP9N/qKt /h8p3S3T1IXrhQpCKk5Am/KjsgHzpfDD1d2/RLhiFThjOJNztS3WNWMYMa4F2tVqDR4p FsZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XP6Sdp3c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id g6-20020a170902c38600b001cf7e390fd3si7113091plg.547.2023.11.26.02.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 02:56:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XP6Sdp3c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CE9A780699D8; Sun, 26 Nov 2023 02:56:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbjKZK4f (ORCPT + 99 others); Sun, 26 Nov 2023 05:56:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKZK4e (ORCPT ); Sun, 26 Nov 2023 05:56:34 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68CBAB6 for ; Sun, 26 Nov 2023 02:56:40 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9ffef4b2741so432536866b.3 for ; Sun, 26 Nov 2023 02:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700996199; x=1701600999; darn=vger.kernel.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=I3GW50siPE3V/OZVTf7EbN7pnDFJwfRoAQudNo2WQ48=; b=XP6Sdp3cduK1+XQIkEtc8Aw33QHLkMEsvn+BTGWYQxYL9XKN3Qav/fK0Lbq+4sjMMK gTlruFRE60Ss2mdeJ+LhY8kOaLTLUtgzOFX6jI5bUweF2BfxkFDCX+/tCbO8blotVuQY 50PH2GupGZjsbiPDBhjfB1SbSv9IwnIkK+pZ7kiOUwSr+Ztmy0puMEBT9JlBdMkRlERZ rMMpckcSmB5Zy78xXVrdmKSt/kO8VXdlSX97Fpu5WuL+cN7RGw8GLKOnwxkAxDsm33T4 r69r77CnPvzrlvJp7kakv2Pae8uiew1DndA3j1hZ1OQREyFHRgCzCdKvE8nf+yxww7U4 Lyvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700996199; x=1701600999; 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=I3GW50siPE3V/OZVTf7EbN7pnDFJwfRoAQudNo2WQ48=; b=Plgk0iqR7B8ifk1xDq7EZ827E1KiiFcsOOrxEZrA9uuZhCLMRPx0NXbTeKkEz6FMoi CiXu9sCnKAoPNCbqUQglTFdGPk1FS5OcncEGIVzXank9sLRfu1Nd3975N+bWGJBHn2r9 7Wv4vvysWTg1+OxZJCnMFf2LWnIArzGVo960kEAM+oYH5VfJ0Dhhhmo4xFV08KsGnZ5n XHNUtjVVWbUm3yVYxbjoeti1hbEGFNumzZQTP7ltBMmXSLlnXdQXSZwUhnt6qq9InhrB WO2iMMwu9IdBwFBVbwVZzKzayJWrXZg+dZ1WSA4BW2Z2j23J+U9Ef6LQ9ZK/SLGCZ1Cg C+LA== X-Gm-Message-State: AOJu0Yy7aDbXEC5useJiKlF4bKb7PigDC2T/d8cbSegOm4ZmS28jUC+c iwU8CqsTg7FMx17YJVyTx0Q= X-Received: by 2002:a17:906:209e:b0:a0a:f9af:c159 with SMTP id 30-20020a170906209e00b00a0af9afc159mr3795403ejq.25.1700996198924; Sun, 26 Nov 2023 02:56:38 -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 r21-20020a170906351500b00a0bd234566bsm1763175eja.143.2023.11.26.02.56.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Nov 2023 02:56:38 -0800 (PST) Message-ID: Date: Sun, 26 Nov 2023 11:56:37 +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 v1 2/3] drm/rockchip: inno_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, mripard@kernel.org References: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> Content-Language: en-US In-Reply-To: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 26 Nov 2023 02:56:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783623799787773333 X-GMAIL-MSGID: 1783623799787773333 The inno_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: Maxime Ripard Signed-off-by: Johan Jonker --- Changed V1: Combined patches Include drm_atomic.h --- drivers/gpu/drm/rockchip/inno_hdmi.c | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index cc48cbf85f31..535cca30c256 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -5,6 +5,13 @@ * Yakir Yang */ +#include +#include +#include +#include +#include +#include + #include #include #include @@ -16,12 +23,6 @@ #include #include -#include -#include -#include -#include -#include - #include "rockchip_drm_drv.h" #include "rockchip_drm_vop.h" @@ -62,7 +63,6 @@ struct inno_hdmi { unsigned int tmds_rate; struct hdmi_data_info hdmi_data; - struct drm_display_mode previous_mode; }; static struct inno_hdmi *encoder_to_inno_hdmi(struct drm_encoder *encoder) @@ -491,26 +491,27 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi, return 0; } -static void inno_hdmi_encoder_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) +static void inno_hdmi_encoder_enable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); + struct drm_connector_state *conn_state; + struct drm_crtc_state *crtc_state; - inno_hdmi_setup(hdmi, adj_mode); + conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector); + if (WARN_ON(!conn_state)) + return; - /* Store the display mode for plugin/DPMS poweron events */ - drm_mode_copy(&hdmi->previous_mode, adj_mode); -} - -static void inno_hdmi_encoder_enable(struct drm_encoder *encoder) -{ - struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); + crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); + if (WARN_ON(!crtc_state)) + return; + inno_hdmi_setup(hdmi, &crtc_state->adjusted_mode); inno_hdmi_set_pwr_mode(hdmi, NORMAL); } -static void inno_hdmi_encoder_disable(struct drm_encoder *encoder) +static void inno_hdmi_encoder_disable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); @@ -531,10 +532,9 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder, } static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = { - .enable = inno_hdmi_encoder_enable, - .disable = inno_hdmi_encoder_disable, - .mode_set = inno_hdmi_encoder_mode_set, - .atomic_check = inno_hdmi_encoder_atomic_check, + .atomic_check = inno_hdmi_encoder_atomic_check, + .atomic_enable = inno_hdmi_encoder_enable, + .atomic_disable = inno_hdmi_encoder_disable, }; static enum drm_connector_status From patchwork Sun Nov 26 10:56:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 169860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2405487vqx; Sun, 26 Nov 2023 02:57:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAkYaUKOXc3a/VpyVXFDIYzrDuN/BFF4b8ilPSPpSGJr9N/gE9z0T4uFx8bZafITpRjkVe X-Received: by 2002:a17:902:d489:b0:1c7:495c:87e0 with SMTP id c9-20020a170902d48900b001c7495c87e0mr10933713plg.37.1700996226752; Sun, 26 Nov 2023 02:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700996226; cv=none; d=google.com; s=arc-20160816; b=Bq33+WWWv741fbzjMO10QuQYJUMe38i9KxU6du7TjE2fW+K6/kg98XGAy/Vzz6K7QN olPfH1bnjtiAu8Q/VB2dYm1uZoz50F3U6ZxrX2uNEEmLYQqB6N4uKHjbQ0a4FjmmC1qw 4AMt3e4/Zj4GBzkgJh4yyTfZmTKL9IK1rlpr3EZ08c/ZjZbmPMYh09/0d1HR5tEN0UsV ChsPaJl2N5ahCji2BCXKE+LjCL/yhbJiCMZsJhpijx+m8gl7EXQN6pDJ47oejpJ1hMNQ nC6qqnK50z5FPFUShBG3azTB52wz0bBe3QG2J/TdrAcDnFwelHT0blMczD3TKRGcsM5H U5Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=Ea1jLeAmnQSy9N/+din3DyjLsbvTIXpsAIcN3X7QL+4=; fh=A5txN680DUrn+7vP1vJQ1x7h0qg5/DBhgY7UdU6iTTY=; b=hfaTWcdL2G0f+M6ZaVqEIAmhdSvE9q6uFXoBBTaATB9eBpilomf32Zo8pPhFciFFIO /i7CHibREYRIMB5a8STKnNlFU/nrXx3rI4yr2vAamHMWehQ156bxLqzWmtiWbQO1y7nX iDI2L/vNMzk0fLL6gxW3Fcy5fn6sdCiGc7S6QI5JNRl4QorhY5LCNLbrOo6ipfw6XyVL 5E/AF4fyvVrOxVj2HNr9/XDo/5bzJmxQZaA9oqqBGW4NXVFjJkv1V49FMtZnDdqBBnQO 846Qsqdd0h+D6sMmRbJIxqyhnZd8N8hByFQ4TEX49sJ+ETCQGkbGvH+UV4qaW7AGlsTb NDZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=njbt1USn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id i1-20020a17090332c100b001cfc16a141bsi1761681plr.292.2023.11.26.02.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 02:57:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=njbt1USn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D8DDA80C4D94; Sun, 26 Nov 2023 02:57:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbjKZK4x (ORCPT + 99 others); Sun, 26 Nov 2023 05:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjKZK4v (ORCPT ); Sun, 26 Nov 2023 05:56:51 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D860EDE for ; Sun, 26 Nov 2023 02:56:57 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a03a9009572so445186966b.3 for ; Sun, 26 Nov 2023 02:56:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700996216; x=1701601016; darn=vger.kernel.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=Ea1jLeAmnQSy9N/+din3DyjLsbvTIXpsAIcN3X7QL+4=; b=njbt1USnhnvjDjHCQUSIY04J9Z/CuapK+l6mL4QDPaCWZbSDDU05KrhQv0te4MBfJ1 LobvaWn4rfKlyWpJIv2jpkvnA7AXbz9N/ldzqhZtr8V74l7CiT4eEKnnegnMBqFz+cyf nt/hjbEtxd50rI9th8sjNFFLore5MpOhmi15oIQ2yRy4eeyI8UmOz9Zpu24VeiuW4FMw +6Q8A9CRd7Lw1LeHuBTtKk9ygh/MF3DQAePh6Vq7srA1MyU3jqKze89i7fIt4gDqoelr oygUyVmXJC2XGlReRuCKz1AxqJtGZWQMLlSX2AHNyyR2CTmBo7T1DcrM/2vz/YFd2KL6 CuDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700996216; x=1701601016; 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=Ea1jLeAmnQSy9N/+din3DyjLsbvTIXpsAIcN3X7QL+4=; b=uDFYWvO3NuBUw0VkUiNsYRnuYFRcXlRA6ZQZ0Nn1JtY3katlyiFMveFRazpIoThUjW +jG2GGnJeaAtVuMVJA0lycy9N75ezSX/JNUW53UxW90V68GBmrXrsG85alJVEw7wEGDq LueiLtjupMiWG7XI52g1k4TQ6XV5tCLA8Lewfl2NEi+En+T1CNxIASBYpON93hmHCqmw DJGd2UMuMcPfhVk27ZWFYzbi2LoXDlN1GmKv7euJbheU4GvUS8XwqYKiFyXzHhdyMX6e nbGGq0y7FFoJef8FBNHYmTkkyA487vqPiuhR9KtPPoFS9HLugWWV115jvC2ArvqiXswC KvSw== X-Gm-Message-State: AOJu0YwaopIa5oBDtTaPn4en6GwHNq+UQZ6cOj9uSI5gkz5RmtY9USKt EZ+8uROEEmoGVXzlQLIKOrc= X-Received: by 2002:a17:906:4557:b0:9e6:38f2:8439 with SMTP id s23-20020a170906455700b009e638f28439mr6350967ejq.60.1700996215660; Sun, 26 Nov 2023 02:56:55 -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 q17-20020a170906145100b00a0949d4f66fsm3083431ejc.54.2023.11.26.02.56.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Nov 2023 02:56:55 -0800 (PST) Message-ID: Date: Sun, 26 Nov 2023 11:56:54 +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 v1 3/3] drm/rockchip: inno_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, mripard@kernel.org References: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> Content-Language: en-US In-Reply-To: <2601b669-c570-f39d-8cf9-bff56c939912@gmail.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 26 Nov 2023 02:57:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783623819522943603 X-GMAIL-MSGID: 1783623819522943603 The drm_dev field in the inno_hdmi struct stores a pointer to the DRM device but is never used anywhere in the driver. Let's remove it. Signed-off-by: Maxime Ripard Signed-off-by: Johan Jonker --- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 -- 1 file changed, 2 deletions(-) -- 2.39.2 diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 535cca30c256..ff7fa11dbc61 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -48,7 +48,6 @@ struct inno_hdmi_i2c { struct inno_hdmi { struct device *dev; - struct drm_device *drm_dev; int irq; struct clk *pclk; @@ -821,7 +820,6 @@ static int inno_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))