From patchwork Mon Aug 14 13:56:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 135466 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2775785vqi; Mon, 14 Aug 2023 07:17:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpizdrtZ+2C64Ia2O3wYK8sV8Y8oa0guOEQW7iG2vlYat7InB4N+9hIytuHDATLYfsOPil X-Received: by 2002:a17:902:ec8c:b0:1bb:7d2f:7c19 with SMTP id x12-20020a170902ec8c00b001bb7d2f7c19mr11701831plg.64.1692022674631; Mon, 14 Aug 2023 07:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692022674; cv=none; d=google.com; s=arc-20160816; b=dF4C5UuttxYyM5m5m4QIWvipY9xNYOt4QQYi1l2+1GfACoIT+jXjtuNnFq3zgkoQje LdKPAbkRQ3NsPb524+pgOHXqhMn4YFX3wmuZwO7ocS9PO98W75sZFhbMpmavo2GssWXv q5MfEgJj+ZKWqlRVJvh6l3khUowOj3+jQFsVmhDcmBgPYRuyTDo02brcVJJuWuaxdzyg 7IQw9UlkVDaJTppfOSnsSb0gw2YGCUJqtqtEmJ9NNd4WEl42XOxkikGy5GbRRJ/fkGoH gvnYNMK3+UVXtq58kZIEPF8G1oGrhWfdTu8uacvPSchXdvK3ObSIT/bvSGaASwVzNhxU nE0g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a170902e80c00b001bb935754f0si8300624plg.444.2023.08.14.07.17.40; Mon, 14 Aug 2023 07:17:54 -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 S231814AbjHNN5d (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774214368004806174 X-GMAIL-MSGID: 1774214368004806174 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, };