From patchwork Wed Apr 2 12:56:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nemesa Garg X-Patchwork-Id: 14035967 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 3127CC3601B for ; Wed, 2 Apr 2025 13:01:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA7E710E797; Wed, 2 Apr 2025 13:01:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gS0++rT+"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 544F010E793; Wed, 2 Apr 2025 13:01:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1743598914; x=1775134914; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JS6CCLIvy+3q8T0XGcJ93Bz5Z1SsKdIg43rpE0gWw4A=; b=gS0++rT+7a1mEPxodl57d/FRiV3f2aBJEx0ukyZWpYv6dgTjhS5/sY1k JuBi7QQ0+kpiTRaDQMROUDFdUpaJOeX/L8BNmjG6UG7AQRhpgxgZLqDh6 w/Zp3r5N7RNMDwy8QrB+rGZr2H7qyeQ2L827GD42ZXMQg6YYwMI2PCsW7 60M22OGKFZQzK7NvuMP3yNbJ7i/I85CHIgK5UXUxyEx+dfmKiVJHTnSUv bTyAXkF6gb2A4J4dmUEt5BchwDakuRx9H22c4slKRVW3eH/mgNq8i/V+b J3v4zYNKSYRdJC2zSFWhpnKanmZx10uw4sf+H94UruI9k8Hxi4hngBn32 g==; X-CSE-ConnectionGUID: U5IjNZe2Qp64G2ZwP+M9kQ== X-CSE-MsgGUID: d3VkHT42Q/aP4Dw9kAbiTw== X-IronPort-AV: E=McAfee;i="6700,10204,11392"; a="44219015" X-IronPort-AV: E=Sophos;i="6.15,182,1739865600"; d="scan'208";a="44219015" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2025 06:01:46 -0700 X-CSE-ConnectionGUID: M2SUikvSQ5OBOXeUwYTeCw== X-CSE-MsgGUID: pqSEZ8JwQvu9nwfipSC4eA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,182,1739865600"; d="scan'208";a="127528167" Received: from nemesa.iind.intel.com ([10.190.239.22]) by fmviesa009.fm.intel.com with ESMTP; 02 Apr 2025 06:01:44 -0700 From: Nemesa Garg To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: Nemesa Garg , Ankit Nautiyal Subject: [PATCH 02/10] drm/i915/display: Introduce HAS_CASF for sharpness support Date: Wed, 2 Apr 2025 18:26:39 +0530 Message-Id: <20250402125647.361295-3-nemesa.garg@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250402125647.361295-1-nemesa.garg@intel.com> References: <20250402125647.361295-1-nemesa.garg@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add HAS_CASF macro to check whether platform supports the content adaptive sharpness capability or not. v2: Update commit message[Ankit] Signed-off-by: Nemesa Garg Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_crtc_state_dump.c | 7 +++++++ drivers/gpu/drm/i915/display/intel_display_device.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index 0c7f91046996..33ec30123214 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -373,6 +373,13 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, intel_vdsc_state_dump(&p, 0, pipe_config); + if (HAS_CASF(display)) { + drm_printf(&p, "sharpness strength: %d, sharpness tap size :%d\n sharpness enable :%d\n", + pipe_config->hw.casf_params.strength, + pipe_config->hw.casf_params.win_size, + pipe_config->hw.casf_params.casf_enable); + } + dump_planes: if (!state) return; diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h index 368b0d3417c2..09b9991beffa 100644 --- a/drivers/gpu/drm/i915/display/intel_display_device.h +++ b/drivers/gpu/drm/i915/display/intel_display_device.h @@ -145,6 +145,7 @@ struct intel_display_platforms { #define HAS_ASYNC_FLIPS(__display) (DISPLAY_VER(__display) >= 5) #define HAS_AS_SDP(__display) (DISPLAY_VER(__display) >= 13) #define HAS_BIGJOINER(__display) (DISPLAY_VER(__display) >= 11 && HAS_DSC(__display)) +#define HAS_CASF(__display) (DISPLAY_VER(__display) >= 20) #define HAS_CDCLK_CRAWL(__display) (DISPLAY_INFO(__display)->has_cdclk_crawl) #define HAS_CDCLK_SQUASH(__display) (DISPLAY_INFO(__display)->has_cdclk_squash) #define HAS_CMRR(__display) (DISPLAY_VER(__display) >= 20)