From patchwork Thu Nov 10 13:47:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 18137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp158767wru; Thu, 10 Nov 2022 05:54:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf68FHV8oZQ7fw8FXxOmqzgjGDV5FnsRRguStQNQwNoCvNxZ5hterLU7ymTdmO8iuFchSnhQ X-Received: by 2002:a17:907:6e1a:b0:7ae:5473:3c76 with SMTP id sd26-20020a1709076e1a00b007ae54733c76mr2483678ejc.752.1668088464342; Thu, 10 Nov 2022 05:54:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668088464; cv=none; d=google.com; s=arc-20160816; b=rcyJXoaQ70HbvPuiEC0kP48nGGmPyzbgdPqm5b7/42/t6x6QjWuApMBgnQjZkOZLGu JgR9eX5BKxip8PduOi+Gq8PeP9RmrqpTngrtoR0J4DZqsZutqkmf3RWBNUImOg3fmvOm 4J56qJJRVDgzhQxRUxOBx8PypfjNyKweE0JMkAPAZ0e+aviKVAbiClwVW1fsFMMdSydT rPMlm2sCz+KTylayRszBRPF2od9oI44p4CFffJHkXphGLxqk6vICD7B7ZnHtOzFguj+Y umthOA00Vxf8OPkdpHr2p9xRdGUJneR2/8dptOMqtU+gU3ci/eNH0k9GAOD3YSMY7Ne1 t8SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OLY2eEQFguZMIlY74s69pwkJXEOkjmvxBO7cb3VXH9s=; b=017RwX9Vb2jomXrMwphnyU8d9ELyL0Hl4IOkA40Zw/foaF5UZfFnl1LmGgXGzUe6Bi LQ6bZLDJaTV2G5yeIIP7C/0WFIc2Xwz4lZXeuZ7El4+UER0y0f70kBSR9bD9blkDZW4L 5pul4TbXOYYc/o+9FdOG0TPDQlRA5n+2edf2x1fF8cnDVeVf4hd9/q95sK8hYEtlncGd +o6nXHHekR5Ww0dcT750cDU7CK5WJTkeVDriq8qQElq5QPPxT0Mh0s3ayCHTl19iiH0v vLatCUrP00a5FxLN/zMA1I2hpOzTzb2qpA2bvfv6g68XUaC+WwMzD905VpcQZaCgFdaf KBpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fhAPyBky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd18-20020a1709069b9200b0078232bfe3a0si18556221ejc.331.2022.11.10.05.53.57; Thu, 10 Nov 2022 05:54:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fhAPyBky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231221AbiKJNsE (ORCPT + 99 others); Thu, 10 Nov 2022 08:48:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbiKJNsB (ORCPT ); Thu, 10 Nov 2022 08:48:01 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7DCB61745 for ; Thu, 10 Nov 2022 05:48:00 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id k8so2357100wrh.1 for ; Thu, 10 Nov 2022 05:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OLY2eEQFguZMIlY74s69pwkJXEOkjmvxBO7cb3VXH9s=; b=fhAPyBkyxhDKeTqg+JqZWQsY4umNf4sYfDnF8USCVvvFTZSNZHUo+JQvef272pkr1c 8I8aqC079tWCHZA/lNHvCzVqIvMVo51wS49wNbWWVRx9uR2UOaewRAcumne6bktPlaIL xez1MlDj8nAsglT7znRsVL3Il1ow8jY3Qxtv7oC1U3Emru5vkfr8gpyjcIGPPnAZ1Lac TB7xf61siUjU2WBFyXwRvlKoCO1ji6PdXb8xsSsjhGIuIMZ1bWfsKbYmjvZGHu5y2fe9 LI0JVeHIloPW2F/9uBZKAeupKYCh33DPq67V+ryoKT5YLPqFM1z6e3hKyjia1x8gVtk+ uvog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OLY2eEQFguZMIlY74s69pwkJXEOkjmvxBO7cb3VXH9s=; b=3ywfdC95kMM6FJU5L5qTWsvf3IVunTC4Np2x5wurCuzd3NHwZoB7oI8ZcbpJuZv6qD jO7bhCMTfK5OKU+40NwGTLCU1v2SoPM+M/i6qRp2pKRWnU3YSnOy4Yq3WK26wDNIECcE UI5cI66MthKkW4PTY23ovpyd78HgR/EJCPAYKQe4FCc1gwIbksDHSSaZFT2KRcCF+jBo kuAXF0raIORARikJiiyZ6agy37b0RPGiRjXzRIwd6rM0clP3JesZSkjFOL0SzEAxbR8t qx1X+r0NJ6j8379V5+hy5h5NyRyVxwLhalxZWwDvpG+SgWnRO340IB5PuB2UyKZfykck REtg== X-Gm-Message-State: ACrzQf1uHYJ2EJO5oAkl7ekhFSp8Jho9a1h5tJGpxqgKQtJ5+5qrom7M KTMMqV6SK48Gcc+DO5+Ni18= X-Received: by 2002:a5d:5a17:0:b0:238:589f:e610 with SMTP id bq23-20020a5d5a17000000b00238589fe610mr885821wrb.42.1668088079216; Thu, 10 Nov 2022 05:47:59 -0800 (PST) Received: from localhost.localdomain ([94.73.35.109]) by smtp.gmail.com with ESMTPSA id h2-20020a5d4302000000b0022ae0965a8asm15717060wrq.24.2022.11.10.05.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:47:58 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: mripard@kernel.org Cc: emma@anholt.net, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= Subject: [PATCH v2 1/2] drm/vc4: hdmi: Pass vc4_hdmi to vc4_hdmi_supports_scrambling() Date: Thu, 10 Nov 2022 14:47:51 +0100 Message-Id: <20221110134752.238820-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110134752.238820-1-jose.exposito89@gmail.com> References: <20221110134752.238820-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 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_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749117529233258106?= X-GMAIL-MSGID: =?utf-8?q?1749117529233258106?= Simplify vc4_hdmi_supports_scrambling() by changing its first parameter from struct drm_encoder to struct vc4_hdmi. Signed-off-by: José Expósito --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 0d78c800ed51..a49f88e5d2b9 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -124,9 +124,8 @@ static unsigned long long vc4_hdmi_encoder_compute_mode_clock(const struct drm_display_mode *mode, unsigned int bpc, enum vc4_hdmi_output_format fmt); -static bool vc4_hdmi_supports_scrambling(struct drm_encoder *encoder) +static bool vc4_hdmi_supports_scrambling(struct vc4_hdmi *vc4_hdmi) { - struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); struct drm_display_info *display = &vc4_hdmi->connector.display_info; lockdep_assert_held(&vc4_hdmi->mutex); @@ -321,7 +320,6 @@ static int vc4_hdmi_reset_link(struct drm_connector *connector, { struct drm_device *drm = connector->dev; struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector); - struct drm_encoder *encoder = &vc4_hdmi->encoder.base; struct drm_connector_state *conn_state; struct drm_crtc_state *crtc_state; struct drm_crtc *crtc; @@ -349,7 +347,7 @@ static int vc4_hdmi_reset_link(struct drm_connector *connector, if (!crtc_state->active) return 0; - if (!vc4_hdmi_supports_scrambling(encoder)) + if (!vc4_hdmi_supports_scrambling(vc4_hdmi)) return 0; scrambling_needed = vc4_hdmi_mode_needs_scrambling(&vc4_hdmi->saved_adjusted_mode, @@ -867,7 +865,7 @@ static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder) lockdep_assert_held(&vc4_hdmi->mutex); - if (!vc4_hdmi_supports_scrambling(encoder)) + if (!vc4_hdmi_supports_scrambling(vc4_hdmi)) return; if (!vc4_hdmi_mode_needs_scrambling(mode, From patchwork Thu Nov 10 13:47:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 18139 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp160317wru; Thu, 10 Nov 2022 05:57:57 -0800 (PST) X-Google-Smtp-Source: AMsMyM65/En8+cHSGZZvXoHyyj3uczJrIWM8o/AVJwr0ySA3LguNjRhELC+7sv7kQEQFZ7jqA6KK X-Received: by 2002:a17:906:5a63:b0:7ad:ac42:150 with SMTP id my35-20020a1709065a6300b007adac420150mr59677936ejc.583.1668088677374; Thu, 10 Nov 2022 05:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668088677; cv=none; d=google.com; s=arc-20160816; b=kPBwJ6SwYFlVM50Vb7Jel78TR6QLBeXnSQk1rcdHAyeIHfEO32HfXnsYAta1B8+HnE dPqWGlJWo0KdAt7ULcCUISfQCtuEtey/eABfcNuz5XlzMFwiRS0FoOoYu252mzJ10gwq iR3S5KwY7tTDaoqIkRRhFJB8EOKpuhlGpi4W+Zb8tDzHwlJ0456h7zUIC/5s8L5LHf/R +m3OvuKCrLhm+fvOQu5Z6lh9L0RNPRyJUHeUifFlZyVXzNIlNPkUj993n09f+J7XiUnC 5S/nrEveF6wxpl8f6ih/vgnkf7pCxQ5NxaHyqLrPns+YpXdyiaIL7hX2tnfABpTZ0Ibe IHQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dFQJswkFzF6rVK/ySLw3u7BUeEqvWgS7HaoyjTUbHaU=; b=ingFBHx/oL6MCQZfj8nXwjaphtExWFM3sjWRRgmtphkbOzrI+7mrmY5SluHubT1KTw ok9pyCJsp2VHFU8PglGkRj2whMMiDN80D3VYrZNxwix6X+XDN6zd1+kRvQl9mXosN4Jz wN/qwUfoz0J5IAxZgo1TfXxOlAae60iS+eXfYqueF6ST3pLaFnr6J740tUHbn5egpW/0 Gq/038r9SR2y/pNNIMmuiFxmak9sqUaqPV9s0D7huZdXtGbDikO/awGl4/OeI58ANc9o 9vVS+EKrpKAC+qnyAmQa6EZU+BKu3ihazrHZwp4E3+RU8QcKlUH3EJlud7TBm43njmIN AWww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FbYEQ4sM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg16-20020a170907a41000b0073c0169863dsi11266843ejc.465.2022.11.10.05.57.31; Thu, 10 Nov 2022 05:57:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FbYEQ4sM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbiKJNsH (ORCPT + 99 others); Thu, 10 Nov 2022 08:48:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbiKJNsD (ORCPT ); Thu, 10 Nov 2022 08:48:03 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8D76B3B3 for ; Thu, 10 Nov 2022 05:48:02 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id l14so2348105wrw.2 for ; Thu, 10 Nov 2022 05:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dFQJswkFzF6rVK/ySLw3u7BUeEqvWgS7HaoyjTUbHaU=; b=FbYEQ4sMHFTKTwrRg+TG7p4q/Sr4qC7TP+ZtXyuyZAo3X/0cPO8yi/3DZcDjiSJbmY W6IVpxLaN2Nh/907f6VE9WpUWDsacrmTcvjmaQbc1K3qvhJcBwH99WHeauqEFD6dTq9h A2hdmu9SQVRciA7r1JEnwzQwioxi3IkeYWz0h1oojcrY+tRWuHICQPJAxdettUko9BwS BdpYTJBNDjqTGO9eXrOAL2nwNNXzGmdqLsSCauwh9jgdgHxB5bPThosvesBkr9u06xUH FF2wdmAP8xn4m5Os2UWdRjTrewr45n02PBcTLjVrbW7F8Un9M4+4ThHm62SiSfwTgesf d48w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dFQJswkFzF6rVK/ySLw3u7BUeEqvWgS7HaoyjTUbHaU=; b=RymnMRauhq94YLaum1HqbbBu9CoCNAUgzYMeb1BHDzwYuI0ETxFKGcHxGm3eZwzImD gk9NXtHZdkJCLt1b6V0xhNXp4t2Ny3+3JfdzQ+xqhR/IXoJmxP6YNaO0ArnXUrGk3YbB Bf1g5A5MEbhnLtcvOZXTQZaLQNo5MkHLw1GE+jdmSN1Szn7L6MGfQbpLIuibnQB8YXP0 BX8VUNThxnlOSdRw/IhMJXobCW8ALy3mTvCrNTD/0X+Xw0Kus2+aK2Fkg/inM3BdM8v8 /Mt2tyoD2qVNdnwBK4B4I242vtiUzESrfLjYVNIraM8/JqKWUsszAsV67GW0cisxzmIX 5IyQ== X-Gm-Message-State: ACrzQf3R/xmyYUYqdubmcdH+pBaS3HGDnyMl+ChiN/e1HIPyp8B87yoX SOVHo9VTHSM33wVVOxD6RnQ= X-Received: by 2002:adf:e603:0:b0:236:80ac:5f4b with SMTP id p3-20020adfe603000000b0023680ac5f4bmr40517495wrm.83.1668088081038; Thu, 10 Nov 2022 05:48:01 -0800 (PST) Received: from localhost.localdomain ([94.73.35.109]) by smtp.gmail.com with ESMTPSA id h2-20020a5d4302000000b0022ae0965a8asm15717060wrq.24.2022.11.10.05.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:48:00 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: mripard@kernel.org Cc: emma@anholt.net, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= Subject: [PATCH v2 2/2] drm/vc4: hdmi: Fix pointer dereference before check Date: Thu, 10 Nov 2022 14:47:52 +0100 Message-Id: <20221110134752.238820-3-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221110134752.238820-1-jose.exposito89@gmail.com> References: <20221110134752.238820-1-jose.exposito89@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 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_NONE,SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749117164925736988?= X-GMAIL-MSGID: =?utf-8?q?1749117752938962952?= Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced the vc4_hdmi_reset_link() function. This function dereferences the "connector" pointer before checking whether it is NULL or not. Rework variable assignment to avoid this issue. Fixes: 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") Signed-off-by: José Expósito --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index a49f88e5d2b9..6b223a5fcf6f 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -318,8 +318,8 @@ static int reset_pipe(struct drm_crtc *crtc, static int vc4_hdmi_reset_link(struct drm_connector *connector, struct drm_modeset_acquire_ctx *ctx) { - struct drm_device *drm = connector->dev; - struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector); + struct drm_device *drm; + struct vc4_hdmi *vc4_hdmi; struct drm_connector_state *conn_state; struct drm_crtc_state *crtc_state; struct drm_crtc *crtc; @@ -330,6 +330,7 @@ static int vc4_hdmi_reset_link(struct drm_connector *connector, if (!connector) return 0; + drm = connector->dev; ret = drm_modeset_lock(&drm->mode_config.connection_mutex, ctx); if (ret) return ret; @@ -347,6 +348,7 @@ static int vc4_hdmi_reset_link(struct drm_connector *connector, if (!crtc_state->active) return 0; + vc4_hdmi = connector_to_vc4_hdmi(connector); if (!vc4_hdmi_supports_scrambling(vc4_hdmi)) return 0;