From patchwork Tue Dec 3 05:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13891744 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 1B2E6E6C60C for ; Tue, 3 Dec 2024 06:05:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82A4310E8F5; Tue, 3 Dec 2024 06:05:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="f4QT++Jd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98F2F10E8F4; Tue, 3 Dec 2024 06:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733205904; x=1764741904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+rOnK0qNMyawlH8Y6ZIsFw6FBJtI+nkkBLmk88oYRck=; b=f4QT++JdgpdtlYhSYjERF/oQPcGK4LXukJlDSjOwh0xC8wJvRu5wru07 e1/OVYEi7A2Aabfy2D5rQ3fA+wHbh1uMyT01afv3CA92BTWBTqQlLf1w3 8ekhWp1lg+vVZM5+FkFNqi3V9cIb4z16uZm/T9hrxUa51JxAzH7obOtsg cpdIhOhlL6P7Kiel33BRRU9PddLIYHumT+bK/oymytclqw/8MQDAxwjha KJxLHhncNEtMs35wsSQXPkGBVlYeBfVKrmZlnaX36UFL4ismoYWt20Tuk 1hoXMcBqBrrAxBNkzfudXilT2YheWI9N77j2U4/gaLp636t2p2oISs4Rs w==; X-CSE-ConnectionGUID: s4YovjLmSGuxS0NSfiCtGA== X-CSE-MsgGUID: 3qMs914zTUGXIVd71JfOCQ== X-IronPort-AV: E=McAfee;i="6700,10204,11274"; a="37058834" X-IronPort-AV: E=Sophos;i="6.12,204,1728975600"; d="scan'208";a="37058834" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2024 22:05:04 -0800 X-CSE-ConnectionGUID: ilqbAQfVQcmdDMwIPR4cOA== X-CSE-MsgGUID: CTEuZQZaT8eCoRD6kERPsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,204,1728975600"; d="scan'208";a="124163820" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orviesa002.jf.intel.com with ESMTP; 02 Dec 2024 22:05:03 -0800 From: Arun R Murthy To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: Arun R Murthy Subject: [PATCH 01/10] drm/crtc: Add histogram properties Date: Tue, 3 Dec 2024 11:25:11 +0530 Message-Id: <20241203055520.1704661-2-arun.r.murthy@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241203055520.1704661-1-arun.r.murthy@intel.com> References: <20241203055520.1704661-1-arun.r.murthy@intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add variables for histogram drm_property, its corrsponding crtc_state variables and define the structure pointed by the blob property. Signed-off-by: Arun R Murthy --- include/drm/drm_crtc.h | 48 +++++++++++++++++++++++++++++++++++++ include/uapi/drm/drm_mode.h | 11 +++++++++ 2 files changed, 59 insertions(+) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 8b48a1974da3..3984cfa00cbf 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -274,6 +274,38 @@ struct drm_crtc_state { */ struct drm_property_blob *gamma_lut; + /** + * @histogram_enable: + * + * This will be set if histogram is enabled for the CRTC. + */ + bool histogram_enable; + + /** + * @histogram_data: + * + * This will hold the pointer to the struct drm_histogram. + * The element data in drm_histogram will hold the pointer to the + * histogram data generated by the hardware. + */ + struct drm_property_blob *histogram_data; + + /** + * @histogram_-iet: + * + * This will hold the pointer to the struct drm_histogram. + * The element data in drm_histogram will hold the pointer to the + * histogram image enhancement generated by the algorithm that is to + * be fed back to the hardware. + */ + struct drm_property_blob *histogram_iet; + /** + * @histogram_iet_updates: + * + * Convey that the image enhanced data has been updated by the user + */ + bool histogram_iet_updated; + /** * @target_vblank: * @@ -1088,6 +1120,22 @@ struct drm_crtc { */ struct drm_property *scaling_filter_property; + /** + * @histogram_enable_property: Optional CRTC property for enabling or + * disabling global histogram. + */ + struct drm_property *histogram_enable_property; + /** + * @histogram_data_proeprty: Optional CRTC property for getting the + * histogram blob data. + */ + struct drm_property *histogram_data_property; + /** + * @histogram_iet_proeprty: Optional CRTC property for writing the + * image enhanced blob data + */ + struct drm_property *histogram_iet_property; + /** * @state: * diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c082810c08a8..da4396f57ed1 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -1355,6 +1355,17 @@ struct drm_mode_closefb { __u32 pad; }; +/** + * struct drm_histogram + * data_ptr: pointer to the array fo u32 data. This data can be histogram + * raw data or image enhanced data + * nr_elements: number of elements pointed by the data @data_ptr + */ +struct drm_histogram { + __u64 data_ptr; + __u32 nr_elements; +}; + #if defined(__cplusplus) } #endif