Received: by 2002:a05:7412:46a4:b0:cf:ab72:ee0d with SMTP id z36csp2696433rdg; Mon, 14 Aug 2023 07:51:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqEfcoh/fLAii1AtE5ihQaYaqrrSSRIqQOkP18DCEaz5E94+MsCgiRm2E4AOYKz+TLoik4 X-Received: by 2002:a17:90a:6642:b0:26b:66f7:c9be with SMTP id f2-20020a17090a664200b0026b66f7c9bemr1318556pjm.10.1692024703353; Mon, 14 Aug 2023 07:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692024703; cv=none; d=google.com; s=arc-20160816; b=ScV02bh2u3uIkap8U974GqR8TikCe3P5B+gG/WRu04sZmBlHRujE8ByWvU2pHFmJZB AbsK3L+rkGs/Ogr6o3FObgnK810lVugBkY/JzC+QkZtY69stIzVFf8VrHm8FMRqlJa3v yrhdl/iEgR4duETLcmPQ8DkLl/B0ipYBYURgay8jBu4YBKK6Dx5rnHkY3qIZ+xUVGrlD 4Sp0fJ0Xl8lFmI/E8toe66/y0JBmhdo2IJfTzXrDQpQ02z4Ugz/kxzcaxVx7ezZTZw34 hB1U1qn6Q4DNrkiQ8AF7DFi2TSUX1vKKijgmEon/Z1/6IUTEB0fg642cWLNh6UwDobXN g1Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=VsMQMC+dqNT198uO/C6rBaW5Ng8QZ1OTjc+4QAAjIwU=; fh=XsS7fCnS6jyV48OHq4AWazZQaFUKJmjcq7fZaQkmGOY=; b=utr61a14kkrziBCTHEmu3KHYOOZfgnuB5Aq6/MB23uNTq6VjxrUhatIcZKV5O/jr8g OTwGypj4BWZ8hnVmQUwZxM/lDxThx9adrAlaiDizH6FKVEXoibsozVg9Im0bk9LRp8mx iP5thf8h25NrfIMehqavIhc6HT55qqCMqnjAldy60AxOILlGNN7E+lmSsyBAoUeqzZtK a0nAQx74fF4HXpiCT+LPsWKJL5KIdKU5S0MA5Rz61oiZYoJcCGqHFyd6ahRO7Q8yGFhF 94qFCTytCiWPPam+FD2OhwC7MdXG6zCEMn3XeK+k3lF6SJRh62UJe7Nebv6Ra+maMilF Wzlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jcBvQE5M; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me18-20020a17090b17d200b00267bb4cfaa7si10845783pjb.88.2023.08.14.07.51.31; Mon, 14 Aug 2023 07:51:43 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=jcBvQE5M; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231810AbjHNN5d (ORCPT + 99 others); Mon, 14 Aug 2023 09:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231744AbjHNN5B (ORCPT ); Mon, 14 Aug 2023 09:57:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3622E7D for ; Mon, 14 Aug 2023 06:57:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 776A961796 for ; Mon, 14 Aug 2023 13:57:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 897AEC433C8; Mon, 14 Aug 2023 13:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692021419; bh=0EIFvA5+tRKt9U3IH9IJeiJikcR9vpCTg2DVlFki8rM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jcBvQE5MgxAtWYsKgfg1Wli1ztakkvC+/9bj6uYYd3VIZgzdxLanbFVjuHJR47qwm b2fDhc2lEHSSmX2B+0SU2b9aaoQ+Yc/66d2+muQC5rhn611nN4Be9kFwJpuwqAqWN8 Cdp5q6m8QiPptSqECfPYMOUm6ML57WQT38KWoriVB8ZfBi7yknhhUvLB0N28JHTgYh ut0fyDaXkrMb/pERj+FFygZAAqzwPaAfZNR8NKXdKbflQvfUStGxx4d7PzrpHYEiwl oiOSqWhPR+XjouVlMeYjHZkxRZFvQwZ0R1Y5P6G7vvBvXJ2oOu1RgNOVtAGsc84odF Wj7NgTFv/ro1A== From: Maxime Ripard Date: Mon, 14 Aug 2023 15:56:24 +0200 Subject: [PATCH RFC 12/13] drm/vc4: hdmi: Create destroy state implementation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230814-kms-hdmi-connector-state-v1-12-048054df3654@kernel.org> References: <20230814-kms-hdmi-connector-state-v1-0-048054df3654@kernel.org> In-Reply-To: <20230814-kms-hdmi-connector-state-v1-0-048054df3654@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt Cc: Hans Verkuil , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1292; i=mripard@kernel.org; h=from:subject:message-id; bh=0EIFvA5+tRKt9U3IH9IJeiJikcR9vpCTg2DVlFki8rM=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDCm3jNr0jlw2e/rjJ8/vmqCvxvEuQXv+1PAsW7apT5hf/ 3iJzNbsjhIWBjEuBlkxRZYYYfMlcadmve5k45sHM4eVCWQIAxenAEzkSjbDj18ObaYXn6yRMJUX Pf77T+SmiOvzDr2dsLUw6fne6U2dMgz/g3v3fJsz4cmRU/4+wVf3rJHaaHR+h+gRRTmWwH1/Li3 8yAsA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 5261526d286f..ac5debd47e99 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -672,11 +672,21 @@ vc4_hdmi_connector_duplicate_state(struct drm_connector *connector) return &new_state->base; } +static void vc4_hdmi_connector_destroy_state(struct drm_connector *connector, + struct drm_connector_state *state) +{ + struct vc4_hdmi_connector_state *vc4_state = + conn_state_to_vc4_hdmi_conn_state(state); + + __drm_atomic_helper_connector_destroy_state(state); + kfree(vc4_state); +} + static const struct drm_connector_funcs vc4_hdmi_connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, .reset = vc4_hdmi_connector_reset, .atomic_duplicate_state = vc4_hdmi_connector_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, + .atomic_destroy_state = vc4_hdmi_connector_destroy_state, .atomic_get_property = vc4_hdmi_connector_get_property, .atomic_set_property = vc4_hdmi_connector_set_property, }; -- 2.41.0