From patchwork Mon Jun 20 07:20:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 12887062 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 41AC8C43334 for ; Mon, 20 Jun 2022 07:24:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72BA710E188; Mon, 20 Jun 2022 07:24:55 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDE6C10E188 for ; Mon, 20 Jun 2022 07:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655709894; x=1687245894; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xkdeQhfUcqOb+IEinqTArbn2UKsMpRu0oDIkLOH+q0k=; b=hXrrtxtZdrxAoenCk3EPogn3yHxD4FNZOld7/0K8sne/lR05nznmZJqF qVS4TYks3BMoH+N+6xzkG5AElsPhxdlKU6bImJU3jdCJliY2K6v0dyw3u /qRfHxwnp4EtOhCYcQCUHZ0kf49hS8j4wIpfdUzqHcRUh/nd1NsNcmQXa OusRghdfSLKkZXY1hr12Y9V8u05aaiXPPZOoY7obhciIrSLl6iZCLzBtR Zgv4pJsFXXf1wzw6GURqdkj6sQVdU0M3WZkZ5UrK3RGYvBH1YJqqEdcMJ s82LapMDZx6kUvSRnLUrwnVxMrKxv+7vUKM+n56X7DRExL7T/jYXUpOLZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="268545304" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="268545304" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 00:24:53 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="642986605" Received: from gpetrea-mobl1.ger.corp.intel.com (HELO jhogande-mobl1.ger.corp.intel.com) ([10.249.41.172]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 00:24:49 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 0/4] HDR aux backlight range calculation Date: Mon, 20 Jun 2022 10:20:15 +0300 Message-Id: <20220620072019.2710652-1-jouni.hogander@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Cc: Jani Nikula , Rodrigo Siqueira , Roman Li , Manasi Navare , Mika Kahola , =?utf-8?q?Jouni_H=C3=B6gander?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch set splits out static hdr metadata backlight range parsing from gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c into gpu/drm/drm-edid.c as a new function. This new function is then used during edid parsing when HDR static metadata block parsing. Calculated values are stored in a new struct drm_luminance_range introduced into display_info. Amdgpu_dm.c and intel_dp_aux_backlight.c are using this new data. v2: Calculate the range during edid parsing and store into display_info Cc: Roman Li Cc: Maarten Lankhorst Cc: Rodrigo Siqueira Cc: Harry Wentland Cc: Lyude Paul Cc: Mika Kahola Cc: Jani Nikula Cc: Manasi Navare Jouni Högander (4): drm/display: Add drm_luminance_range_info drm: New function to get luminance range based on static hdr metadata drm/amdgpu_dm: Rely on split out luminance calculation function drm/i915: Use luminance range calculated during edid parsing .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++----------- drivers/gpu/drm/drm_edid.c | 50 ++++++++++++++++++- .../drm/i915/display/intel_dp_aux_backlight.c | 17 +++++-- include/drm/drm_connector.h | 21 ++++++++ 4 files changed, 88 insertions(+), 35 deletions(-)