From patchwork Tue Jul 19 09:56:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 12922334 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 EE639C43334 for ; Tue, 19 Jul 2022 09:57:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C2C8314B24F; Tue, 19 Jul 2022 09:57:23 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED7CD14B248; Tue, 19 Jul 2022 09:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658224642; x=1689760642; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=haEhQVc5xp0PnhHW61L6L96s4XE497aPMoljPuiPq7U=; b=aHeBuy8bCtRCAXTGwRb586OLM1flHqoSNrPedHJA5w+un810FPBWY1cr GYBpLaUwgnwOt2RwfrPTd2gHD5TiFXGH2A8sqVnIVNsalTet9DSqUAMFe TliEgiucEGwNR2/YR1gOkR6saadSa8hbTqS9NrdoR5vx0Ikfw3uSplp4j gFNtA7ZutzCOyoacLIT6qLiPB6zMF5thLOuFbQPXS5Eh2dLyrPRN/wJFd XSsyHn04FgFRlSgSWambpt7DxJBDdThp9kjUnG4F4xxvW3XIf7hS76WE9 R4JZUgHBNXYoYx0juM7wiUFKpO0gSlMCe6cCshkQH5wxwOJFDYtf19S50 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="287194292" X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="287194292" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 02:57:21 -0700 X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="594776422" Received: from slinke-mobl1.ger.corp.intel.com (HELO jhogande-mobl1.ger.corp.intel.com) ([10.251.210.1]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2022 02:57:16 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH v3 0/3] HDR aux backlight range calculation Date: Tue, 19 Jul 2022 12:56:57 +0300 Message-Id: <20220719095700.14923-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. v3: Some clean-ups suggested by Jani Nikula 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 (3): 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 | 52 ++++++++++++++++++- .../drm/i915/display/intel_dp_aux_backlight.c | 15 +++++- include/drm/drm_connector.h | 21 ++++++++ 4 files changed, 89 insertions(+), 34 deletions(-)