From patchwork Fri Apr 11 06:02:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 14047604 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 29BE6C369A8 for ; Fri, 11 Apr 2025 06:02:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A174910EAFB; Fri, 11 Apr 2025 06:02:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="a03qqFA7"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E9DD10EAF8; Fri, 11 Apr 2025 06:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744351357; x=1775887357; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EY3ZsOSF32ypaMWWWCnhWYHzXmnbPo5uta/3KdjGt78=; b=a03qqFA7NqfF/G0cQUXTTH1j5I7uizI2jdBTVKWCq8Iwa5KYNzweAGgy uxoxZzsIC7kK8hq9DXobmXgL0Tj8NuBOpcEKkpcqNBlZtm2PhG3N6ffcB 0M5wLizJttPAfC+LHldAWDdg4flLqChcvNhWtGUZ6bdltmmD83K9qMMbH eoz3KR3YJtAgokWpLj9OiBbSO98qlj6rlvTU95sOjDJK2UcadpEwTuxQS nuLaKeDEc/NyAvK/+geywEtqwQkVx8Yb88U1UsZrzqpmSnRuoc7WlFnPc TfU1BcSXOD6IOINlqTc5ToHPsU0PHBEtUUzBC7/nifDDwLxpGhGNO6Y3W w==; X-CSE-ConnectionGUID: 6ht5fwNFSj2U87E8vn76sA== X-CSE-MsgGUID: ZsZw6M4xT5Gx7qM8qbsBzA== X-IronPort-AV: E=McAfee;i="6700,10204,11400"; a="46022208" X-IronPort-AV: E=Sophos;i="6.15,203,1739865600"; d="scan'208";a="46022208" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2025 23:02:37 -0700 X-CSE-ConnectionGUID: SkIkw1OITmmn4a2M+Atn2g== X-CSE-MsgGUID: tPXEiv0fQO2JmrEi6fNf6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,203,1739865600"; d="scan'208";a="129046760" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa010.jf.intel.com with ESMTP; 10 Apr 2025 23:02:35 -0700 From: Suraj Kandpal To: dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com, Suraj Kandpal Subject: [PATCH 1/2] drm/dp: Add smooth brightness register bit definition Date: Fri, 11 Apr 2025 11:32:35 +0530 Message-Id: <20250411060235.2732060-2-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250411060235.2732060-1-suraj.kandpal@intel.com> References: <20250411060235.2732060-1-suraj.kandpal@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 DP_EDP_SMOOTH_BRIGHTNESS register bit definition for EDP_GENERAL_CAPABILITY 2 register. --v2 -Add eDP 2.0 comment [Ankit] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index c413ef68f9a3..3001c0b6e7bb 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -1025,6 +1025,7 @@ #define DP_EDP_GENERAL_CAP_2 0x703 # define DP_EDP_OVERDRIVE_ENGINE_ENABLED (1 << 0) # define DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE (1 << 4) +# define DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE (1 << 6) /* eDP 2.0 */ #define DP_EDP_GENERAL_CAP_3 0x704 /* eDP 1.4 */ # define DP_EDP_X_REGION_CAP_MASK (0xf << 0) From patchwork Fri Apr 11 06:02:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 14047605 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 80336C369AB for ; Fri, 11 Apr 2025 06:02:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 532EC10EAE5; Fri, 11 Apr 2025 06:02:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JCx2zW4R"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D78910EAFA; Fri, 11 Apr 2025 06:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744351359; x=1775887359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QNpOCQ6jBmZFGy7dgLxnhrBe/bS0I4kigIwgZmiVObY=; b=JCx2zW4RXKzEgmZ33/XQYj35Ao03LggNnb2Rm03asc956N/lKSDObLHZ yWXk2ErgOL4oiqhUN5ZWOTF2CgtNLhzJBVDn0IS9WxgFWAihM2992NCR6 f3KT2aMEPV3Ax6SSUNRPenshzxbB/A5Colp66TP0prtfKYPmtLdVb73ZS gT9CkyY6TLiQmM/Izf4AfCmC4n66R4Xsb3SEQgvu9R3hXXt4xvagJgGwF EarNkPvw090x/sHRJSSzXoBzgdwy71fMf76Zgn0my5aflTrWPSxgieiOp GE7yUZ2ZrZdU/1lK+ntz2UcWI2IrsQaJ748tZGCTCcH6AlKj5XJ5KUQKo g==; X-CSE-ConnectionGUID: JUFM0x7yTT67HxN+jUeYMQ== X-CSE-MsgGUID: AeSoRshbRVOcgyH5xrpmcA== X-IronPort-AV: E=McAfee;i="6700,10204,11400"; a="46022211" X-IronPort-AV: E=Sophos;i="6.15,203,1739865600"; d="scan'208";a="46022211" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2025 23:02:39 -0700 X-CSE-ConnectionGUID: vRa0+Jr5T0uygDeBgwAiRQ== X-CSE-MsgGUID: EODsEMTXRFq9rNxm7wbE9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,203,1739865600"; d="scan'208";a="129046783" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa010.jf.intel.com with ESMTP; 10 Apr 2025 23:02:37 -0700 From: Suraj Kandpal To: dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com, Suraj Kandpal Subject: [PATCH 2/2] drm/i915/backlight: Modify condition to use panel luminance Date: Fri, 11 Apr 2025 11:32:36 +0530 Message-Id: <20250411060235.2732060-3-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250411060235.2732060-1-suraj.kandpal@intel.com> References: <20250411060235.2732060-1-suraj.kandpal@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" According to our internal spec we need to now check if both panel luminance and smooth brightness are available in panel for us to be able to change brightness using luminance value. --v2 -Add Fixes tag [Ankit] Fixes: 64481497924d ("drm/i915/backlight: Check Luminance based brightness control for VESA") Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c index 8173de8aec63..20ab90acb351 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -663,7 +663,8 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector) struct intel_dp *intel_dp = intel_attached_dp(connector); struct intel_panel *panel = &connector->panel; - if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) { + if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE) && + (intel_dp->edp_dpcd[3] & DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE)) { drm_dbg_kms(display->drm, "[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n", connector->base.base.id, connector->base.name);