Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3214723imu; Fri, 18 Jan 2019 06:46:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN4tP60oh9pKSUrrkqxM3g3rvIqvTfcoVxn++/wqtmwGGoxXkiVrFVCgc5tY9moaTwsL8YP4 X-Received: by 2002:a63:580a:: with SMTP id m10mr17672279pgb.332.1547822785906; Fri, 18 Jan 2019 06:46:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547822785; cv=none; d=google.com; s=arc-20160816; b=CzkrJ9il0/RrNwOqy4j3hvqYswztNkYEQD87d78yiiKaW08t8VuPp47Wb+COxntLjK iynDQGPzlVkRT06Zzr+KqZGCvsp0N+AS2z0dbIvDJOYfaXcomus77COXqYOBWG9RYzlC z7ROX5CmF+Meaig+T1b/pz3VAKgrjpDZ5GRpHhwdmczeqKL+C46XGNyt3q8VDp3myHEa GueNhKNaQlGMTAvQobuT+uVvwYzcecK2qZggB1whS/JSvPTQQzQpRDV2BTVXChr2mUqe c1tF6hnIO+L5xdA1x5u1l7NCQJEVqQlPyN/ToeNYap5vYGElF//fFPmdWfqAkobNi4dp DykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4gYz7wb6RnDQglD0m8hw0O93U+SgyVPjGFftRjgdhCI=; b=Hu2oIZdVemZzjepPU4kNjTwd8947XDrrPCY3Q8l8pRA9pgiGw1f6CWLtUvWbaAiEL6 KFCPdxpVB0ys71dpVvk3fewka4XP4TONJSF+/bZAs4Dbj+/0OOHtq1Y9jMb51gAdLh7U DlQk+RlKkK5myvTx70ydFRbNrc/+StA9ZbapDgmmZyGFFEF9hFFCRS+JHZd0V3YmMg7e z58EBdVUagxdyuXIeNkqB2Uq//UukdS4qBWLNnjsyD5WvnXp0D2FpHHKHl4foHPbm0Ho 8+UUbemvNC0QEXxEXcddTTSZGJvwCZ0HOHOKQ4p7BfYPeTtLzw4jVfAXWPQAwAgadUtF YKRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b26si4500040pgl.539.2019.01.18.06.46.09; Fri, 18 Jan 2019 06:46:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbfAROog (ORCPT + 99 others); Fri, 18 Jan 2019 09:44:36 -0500 Received: from mga07.intel.com ([134.134.136.100]:57816 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727707AbfAROoa (ORCPT ); Fri, 18 Jan 2019 09:44:30 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 06:44:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,491,1539673200"; d="scan'208";a="115697668" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga007.fm.intel.com with SMTP; 18 Jan 2019 06:44:25 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 18 Jan 2019 16:44:24 +0200 Date: Fri, 18 Jan 2019 16:44:24 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Andrzej Hajda Cc: Christoph Manszewski , linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Maxime Ripard , Seung-Woo Kim , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , Sean Paul , linux-arm-kernel@lists.infradead.org, Marek Szyprowski , 'Hans Verkuil' Subject: Re: [PATCH 1/6] include/drm: color_mgmt: Add enum labels Message-ID: <20190118144424.GL20097@intel.com> References: <1544789421-5265-1-git-send-email-c.manszewski@samsung.com> <1544789421-5265-2-git-send-email-c.manszewski@samsung.com> <20190117194722.GJ20097@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 18, 2019 at 03:34:18PM +0100, Andrzej Hajda wrote: > +CC: Hans > > On 17.01.2019 20:47, Ville Syrj?l? wrote: > > On Fri, Dec 14, 2018 at 01:10:16PM +0100, Christoph Manszewski wrote: > >> Range setting makes sense for YCbCr and RGB buffers. Current > >> drm_color_range enum labels suggest use with YCbCr buffers. > >> Create enum labels without colorspace specification. > >> > >> Signed-off-by: Christoph Manszewski > >> --- > >> include/drm/drm_color_mgmt.h | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/include/drm/drm_color_mgmt.h b/include/drm/drm_color_mgmt.h > >> index 90ef9996d9a4..52f6d5221a0d 100644 > >> --- a/include/drm/drm_color_mgmt.h > >> +++ b/include/drm/drm_color_mgmt.h > >> @@ -62,6 +62,8 @@ enum drm_color_range { > >> DRM_COLOR_YCBCR_LIMITED_RANGE, > >> DRM_COLOR_YCBCR_FULL_RANGE, > >> DRM_COLOR_RANGE_MAX, > >> + DRM_COLOR_LIMITED_RANGE = DRM_COLOR_YCBCR_LIMITED_RANGE, > >> + DRM_COLOR_FULL_RANGE = DRM_COLOR_YCBCR_FULL_RANGE, > > These enum values don't mean anything really. The strings are what > > matter for the uapi. > > > > The default for YCbCr needs to be limited range, the default for RGB > > needs to be full range. So I think this would really require a separate > > prop for each. > > > > But is there an actual usecase for this stuff? > > > Yes, for example HDMI path (Display Controller and HDMI encoder) in > Exynos5433 works on RGB buffers and do not perform any conversion if the > output is also RGB, on the other side CEA861 specs says that in case of > CEA modes output RGB should be in limited range, in case of non CEA > modes it should be full range. > > The idea was to allow userspace to check (atomic_check) which ranges are > acceptable in given mode and to set desired one if possible. > > Any better solution is welcome? i915 has the "Broadcast RGB" property for the CEA-861 stuff. You don't have a way to implement that? -- Ville Syrj?l? Intel