From patchwork Fri Mar 27 07:31:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vipin Anand X-Patchwork-Id: 11461931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B5D51392 for ; Fri, 27 Mar 2020 07:33:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 342A620578 for ; Fri, 27 Mar 2020 07:33:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 342A620578 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EEAC06E9B6; Fri, 27 Mar 2020 07:33:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 616F36E9AD for ; Fri, 27 Mar 2020 07:33:04 +0000 (UTC) IronPort-SDR: JuB3atv8IegAUrBbj/fuJj7+GLixaqnvgs4D4wXeFN4aChIhaUjlaCALVMBZOoy75sSlfcJfJC rI99kSUh60Ig== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 00:33:04 -0700 IronPort-SDR: YRklv4oWkryhYQxmWLrt2Ta2fC9hEtlraAoPApysV7P/ayY2gT22/LpvJ/nFgV5RX3QFkAxDr+ LT2qcfmK4erA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,311,1580803200"; d="scan'208";a="251061020" Received: from vipinana-nuc7i7bnh.iind.intel.com ([10.66.179.10]) by orsmga006.jf.intel.com with ESMTP; 27 Mar 2020 00:33:03 -0700 From: Vipin Anand To: intel-gfx@lists.freedesktop.org Date: Fri, 27 Mar 2020 13:01:37 +0530 Message-Id: <20200327073140.11568-5-vipin.anand@intel.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200327073140.11568-1-vipin.anand@intel.com> References: <20200327073140.11568-1-vipin.anand@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v3 4/7] drm/i915/display: Set HDR Infoframe for HDR capable LSPCON devices 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" From: Uma Shankar Send Dynamic Range and Mastering Infoframe (DRM for HDR metadata) as SDP packet to LSPCON following the DP spec. LSPCON receives the same and sends it to HDMI sink. v2: Suppressed some warnings. No functional change. Signed-off-by: Uma Shankar Signed-off-by: Vipin Anand --- drivers/gpu/drm/drm_atomic_state_helper.c | 1 + drivers/gpu/drm/drm_atomic_uapi.c | 1 + drivers/gpu/drm/i915/display/intel_lspcon.h | 1 + include/drm/drm_connector.h | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c index 7cf3cf936547..7cf98c06f424 100644 --- a/drivers/gpu/drm/drm_atomic_state_helper.c +++ b/drivers/gpu/drm/drm_atomic_state_helper.c @@ -468,6 +468,7 @@ __drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector, if (state->hdr_output_metadata) drm_property_blob_get(state->hdr_output_metadata); + state->hdr_metadata_changed = false; /* Don't copy over a writeback job, they are used only once */ state->writeback_job = NULL; diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index a1e5e262bae2..4c520e0b9872 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -734,6 +734,7 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, val, sizeof(struct hdr_output_metadata), -1, &replaced); + state->hdr_metadata_changed |= replaced; return ret; } else if (property == config->aspect_ratio_property) { state->picture_aspect_ratio = val; diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h index b2051f236223..bc34124f532e 100644 --- a/drivers/gpu/drm/i915/display/intel_lspcon.h +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h @@ -38,4 +38,5 @@ void lspcon_drm_write_infoframe(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, unsigned int type, const void *frame, ssize_t len); + #endif /* __INTEL_LSPCON_H__ */ diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 221910948b37..28df268aa1a7 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -661,6 +661,7 @@ struct drm_connector_state { * DRM blob property for HDR output metadata */ struct drm_property_blob *hdr_output_metadata; + u8 hdr_metadata_changed : 1; }; /**