Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2802194ybd; Mon, 24 Jun 2019 12:58:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyie0UvfbOYue+m4WN+es1PjIJfPhiD7SRX69/pUzAyl+t5YYGgE4jDWg3CAFOJ3gbwf5gy X-Received: by 2002:a63:9502:: with SMTP id p2mr24859583pgd.12.1561406309043; Mon, 24 Jun 2019 12:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561406309; cv=none; d=google.com; s=arc-20160816; b=ZCL5WYg/QWn+T7ALf+yexFnB0ziDbua+R9bp0ol54iayPAwu8joJJPsyrIYf77IrAN Es28UchuOQC0q6QQz5QHU/xHLZeE65IKdhXHF8dKIdeY8wcwvoifvqZmr1TiO6mfTaZF ZpoGyWH+nbl3GPcN1cS0i3pJtXZ2buie/trwvMZUJPtQIIPziuyRbmQOmnHFsLXOeOQ5 1++eOgPFjwKthAx89J2cUk9K44JfLvMV0ELM5Urdnqadl9AZuBNGyYscv07QuOkmEgA+ wx6Ww8Jkbm9+rVrv57dbDhbbNbxSZN04cTHw0r2wixAXFFNPEptdxJxzcvfLzg3xAUSm PpxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=abS+6DloIczu5CxTbYrTiqZuCYlaY7YlFp555KOJFnU=; b=xDzenjaAjpWoCpkVuhTyvZbNnXP7Wbz6FW3vEpBqzENLhx7kJrOoteuHKgSKB/YTV/ pXORZrNuNlHRP2QCtAwyR8VM/lm40mXdjA3jJ33lneDyDzrcNfDZWt+0bOd2c0SjOVWZ r+dYgPBPfdJqmfdQvbCeVKFExuh7iHvCoyZBCjaIPNeIS8l3YJes1fOc3jKphxnYTBeo tLNud9VmLcI443hh+qeCtU+LpzPj8fQF7HCrMtmEDUgPRY+PdHXJPLxL+sqM0rKyIOMK 32/VrwXMWYvSB51GIsM3qLsOoVvFbTpkC/fqdjoHX5+oNYt9NMETsIuFkseQK1lTlcHX T5AA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si10880552pgv.164.2019.06.24.12.58.13; Mon, 24 Jun 2019 12:58:29 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729356AbfFXQHk convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Jun 2019 12:07:40 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:43090 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbfFXQHj (ORCPT ); Mon, 24 Jun 2019 12:07:39 -0400 Received: by mail-ed1-f68.google.com with SMTP id e3so22489725edr.10 for ; Mon, 24 Jun 2019 09:07:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=pWYsiKGg/zyVesxoNDfGpttEfT3N8EUCOmxzrH5E//Q=; b=NcgfnVJU/rtcPBB9LtT0h/faDwzG93aspuwiCIGowNaO2aqrMfkOQS+yFS2yhDq5ta yB/1tpVc7tJpmpzSqSCuopG792V7x7as4BSj5bMRbSkvIbPH3Wciq6VHmxicudxOSk91 olewnncHXoSC+APEVPgSxKp8I2/tk/ZBn2AorBZ/rGtfpb/wQqMJhRMf9ptCbVVTv7R6 vPQuwjd5hFn5I24qInUqxnU0RRuPuAw0HwjBx3Iy4l2XAXU1tXHFofdyF1GQeSqLC3gY MzqMx8NyhTbGY45PaCg57Cb0e40Q3mEuVKTqPtUGsnyGc0FaPRg+LDIHL2rdl9vUy52m jZWA== X-Gm-Message-State: APjAAAUNmgkpVj58A1VYMElPL58Xig4ux64jA/cAefSkbEgHQrqyUaDb JvSGyZZsdTNxyftVLGAbaOx8wPJpfCE= X-Received: by 2002:a05:6402:1446:: with SMTP id d6mr126699677edx.37.1561392457073; Mon, 24 Jun 2019 09:07:37 -0700 (PDT) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com. [209.85.128.46]) by smtp.gmail.com with ESMTPSA id l35sm842315edc.2.2019.06.24.09.07.35 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 09:07:35 -0700 (PDT) Received: by mail-wm1-f46.google.com with SMTP id g135so13331120wme.4 for ; Mon, 24 Jun 2019 09:07:35 -0700 (PDT) X-Received: by 2002:a7b:c051:: with SMTP id u17mr16105850wmc.25.1561392454870; Mon, 24 Jun 2019 09:07:34 -0700 (PDT) MIME-Version: 1.0 References: <3f9e51d5-8ca5-a439-943c-26de92dd52fe@samsung.com> <44611965.cJa5QBey4U@jernej-laptop> In-Reply-To: <44611965.cJa5QBey4U@jernej-laptop> From: Chen-Yu Tsai Date: Tue, 25 Jun 2019 00:07:23 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] drm/sun4i: Enable DRM InfoFrame support on H6 To: =?UTF-8?Q?Jernej_=C5=A0krabec?= Cc: Andrzej Hajda , Jonas Karlman , "Laurent.pinchart@ideasonboard.com" , "narmstrong@baylibre.com" , "khilman@baylibre.com" , "zhengyang@rock-chips.com" , "maxime.ripard@bootlin.com" , "hjc@rock-chips.com" , "heiko@sntech.de" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 12:03 AM Jernej Škrabec wrote: > > Dne ponedeljek, 24. junij 2019 ob 17:56:30 CEST je Chen-Yu Tsai napisal(a): > > On Mon, Jun 24, 2019 at 11:49 PM Andrzej Hajda wrote: > > > On 24.06.2019 17:05, Jernej Škrabec wrote: > > > > Dne ponedeljek, 24. junij 2019 ob 17:03:31 CEST je Andrzej Hajda > napisal(a): > > > >> On 26.05.2019 23:20, Jonas Karlman wrote: > > > >>> This patch enables Dynamic Range and Mastering InfoFrame on H6. > > > >>> > > > >>> Cc: Maxime Ripard > > > >>> Cc: Jernej Skrabec > > > >>> Signed-off-by: Jonas Karlman > > > >>> --- > > > >>> > > > >>> drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 2 ++ > > > >>> drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 + > > > >>> 2 files changed, 3 insertions(+) > > > >>> > > > >>> diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c > > > >>> b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c index > > > >>> 39d8509d96a0..b80164dd8ad8 > > > >>> 100644 > > > >>> --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c > > > >>> +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c > > > >>> @@ -189,6 +189,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, > > > >>> struct device *master,> > > > >>> > > > >>> sun8i_hdmi_phy_init(hdmi->phy); > > > >>> > > > >>> plat_data->mode_valid = hdmi->quirks->mode_valid; > > > >>> > > > >>> + plat_data->drm_infoframe = hdmi->quirks->drm_infoframe; > > > >>> > > > >>> sun8i_hdmi_phy_set_ops(hdmi->phy, plat_data); > > > >>> > > > >>> platform_set_drvdata(pdev, hdmi); > > > >>> > > > >>> @@ -255,6 +256,7 @@ static const struct sun8i_dw_hdmi_quirks > > > >>> sun8i_a83t_quirks = {> > > > >>> > > > >>> static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = { > > > >>> > > > >>> .mode_valid = sun8i_dw_hdmi_mode_valid_h6, > > > >>> > > > >>> + .drm_infoframe = true, > > > >>> > > > >>> }; > > > >>> > > > >>> static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = { > > > >>> > > > >>> diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h > > > >>> b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h index > > > >>> 720c5aa8adc1..2a0ec08ee236 > > > >>> 100644 > > > >>> --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h > > > >>> +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h > > > >>> @@ -178,6 +178,7 @@ struct sun8i_dw_hdmi_quirks { > > > >>> > > > >>> enum drm_mode_status (*mode_valid)(struct drm_connector > > > > > > > > *connector, > > > > > > > >>> const struct > > > > > > > > drm_display_mode *mode); > > > > > > > >>> unsigned int set_rate : 1; > > > >>> > > > >>> + unsigned int drm_infoframe : 1; > > > >> > > > >> Again, drm_infoframe suggests it contains inforframe, but in fact it > > > >> just informs infoframe can be used, so again my suggestion > > > >> use_drm_infoframe. > > > >> > > > >> Moreover bool type seems more appropriate here. > > > > > > > > checkpatch will give warning if bool is used. > > > > > > Then I would say "fix/ignore checkpatch" :) > > > > > > But maybe there is a reason. > > > > Here's an old one from Linus: https://lkml.org/lkml/2013/9/1/154 > > > > I'd say that bool in a struct is a waste of space compared to a 1 bit > > bitfield, especially when there already are other bitfields in the same > > struct. > > > Anyway I've tested and I do not see the warning, could you elaborate it. > > > > Maybe checkpatch.pl --strict? > > It seems they removed that check: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/? > id=7967656ffbfa493f5546c0f1 > > After reading that block of text, I'm not sure what would be prefered way for > this case. This: +If a structure has many true/false values, consider consolidating them into a +bitfield with 1 bit members, or using an appropriate fixed width type, such as +u8. would suggest using a bitfield, or flags within a fixed width type? ChenYu