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 9CBBDCE7AFD for ; Fri, 6 Sep 2024 10:05:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E6FC10E9F4; Fri, 6 Sep 2024 10:05:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="PtpNH9gq"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D43C910E9F5 for ; Fri, 6 Sep 2024 10:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725617102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VFO3W/ZUCLWQ9AAwcJEb1HAwNECuSqbI/yZqAmLm/9g=; b=PtpNH9gqMGIaRZv4XIMxAl+79QyYXt46UgRXps2DAwJAr00BhYnBfa3ONdbXhDfFwfH9Qt C+U3gGOVe90+zoUOWkzz31XuVSSbJvI5GDkpXZtRyMg7xCwOkgoahcGsfMAUOAdefBKWrp kpKcdbcNC+p0lGRTLrO7Bo8U1HZ8WV8= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-265-0egiFsLTOlaIdZVKGYhNuw-1; Fri, 06 Sep 2024 06:04:58 -0400 X-MC-Unique: 0egiFsLTOlaIdZVKGYhNuw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B639B1955F68; Fri, 6 Sep 2024 10:04:56 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.39.193.228]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 62F2A1956086; Fri, 6 Sep 2024 10:04:53 +0000 (UTC) From: Jocelyn Falempe To: Karol Herbst , Lyude Paul , Danilo Krummrich , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Cc: Jocelyn Falempe Subject: [PATCH v2 2/3] drm/panic: add a private pointer to struct drm_scanout_buffer Date: Fri, 6 Sep 2024 12:03:01 +0200 Message-ID: <20240906100434.1171093-3-jfalempe@redhat.com> In-Reply-To: <20240906100434.1171093-1-jfalempe@redhat.com> References: <20240906100434.1171093-1-jfalempe@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" It can be set to a private structure in get_scanout_buffer(), and used later in set_pixel() or in panic_flush(). Signed-off-by: Jocelyn Falempe --- include/drm/drm_panic.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/drm/drm_panic.h b/include/drm/drm_panic.h index 54085d5d05c3..afdbb27ead67 100644 --- a/include/drm/drm_panic.h +++ b/include/drm/drm_panic.h @@ -54,6 +54,13 @@ struct drm_scanout_buffer { */ unsigned int pitch[DRM_FORMAT_MAX_PLANES]; + /** + * @private: Optional pointer to some private data you want to pass to + * the set_pixel() or panic_flush() function. It must stay valid between + * the get_scanout_buffer() call and the panic_flush() call. + */ + void *private; + /** * @set_pixel: Optional function, to set a pixel color on the * framebuffer. It allows to handle special tiling format inside the -- 2.46.0