Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2796608ybd; Mon, 24 Jun 2019 12:51:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrdYcHHAcmaJ8JwEkf2hEX2EKztKVQ95luomZnjvQjYUI/s7BkJUk8zusPyOcuQlGXrEs/ X-Received: by 2002:a17:90a:360b:: with SMTP id s11mr26526789pjb.51.1561405887974; Mon, 24 Jun 2019 12:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561405887; cv=none; d=google.com; s=arc-20160816; b=qwipG8WBKbAd+V4bI/z534Rfgxyr1YrUyVphgZo17FO+Zx3GEZ+FIkMbVvAmeYjifY QHCmtX5Td+sFZ96YlfqIpAH6su9i8YcOaloW4mV6ZmOFwS/E73XEVa+UX6fuD6EQ7CG2 lwKiC7pDgDH2aCiHFy/5YhpN63Ru7t/n7fDCdzQ6DPEm+YlsI7tJJ5b1DEDCncaH62xM tPINnDwLhjK+YXh00NOcCbzGkA5bKMZRS+R+dP/xXbIHQBHeSAntVgpH3axM416ix25m OsYOkUy5S+TthyYzLjhki758HftOzMOPZa42PB9Eeon+vpSgHuJ4wEviFdbOjbmIEo4k UWqg== 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=otsyyCU7WjctN1C2Q3ggPR+teTRLcLP4VsRFa6CTYUs=; b=bGYwLaC7Mk1ab9qBjkF4ViWK37P/NXT1FWpb1CRrNwo4rp3DWQa4GMd8okrZTqaytV 79U+qYPdMe7SgFzuifwP0C4qnbWERTJSzEWpcwtEoyRQvjjNAwXXuCP1PKdK6X5+8zNM fE7JGAsIipMvUJcTsju3vNcTUS9kp7ohxDKNGNnRhpTZY+Yv74yqyBGabM5D6AIYOF9v tYceyoPL6o7/taLbRtSnGKQOx+Uy+L5Oku5Qp9IpjRJXjbdFZBqNL2UgHWGfAlpjBgF2 yDBVppAv4tUGVVv/+Jckr3FGJJ2ukH0NreuRkHiYPLg0dTfrd4PHyIkUAd4ang8LI5YD aeCg== 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 13si11406680pfh.169.2019.06.24.12.51.11; Mon, 24 Jun 2019 12:51:27 -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 S1731386AbfFXP4q convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Jun 2019 11:56:46 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34898 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbfFXP4p (ORCPT ); Mon, 24 Jun 2019 11:56:45 -0400 Received: by mail-ed1-f66.google.com with SMTP id w20so14876775edd.2 for ; Mon, 24 Jun 2019 08:56:44 -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=mMUgs4HoLKDmtg/T/uzM5Qeyyd0kP1F7cWc1uMkgeRs=; b=f6MpH70T/k12GzVORXWXsIR5heiROU0PHkVp7O3nLmesMTRtGRU2q4qux4S17fPm8e bjpIce4BQxwKkLtPH17KSvdkicwRqwwo5rSZhITaF4FrjoWa3zM+BHGP30yYAS/AnxFS OaXm0mFmQTwkf0xkdNfNcs1qdcKpfzwWEW2eTIqdtbErrsv3ThAQfP9EOQFXzQHKJVP6 CP7iEi/ZHJ92LxFnYZhPeAqXcymKo72+w6qNMZul4f8hEr9nL12h3mW7PgzPjxQko5fH c7S3ATWSkYvaYeBgkSeTACm2k3zB/ZDwT6diszCKJXmg9pP1Xj6NDWX+H8+mFOrxo8+u YEZg== X-Gm-Message-State: APjAAAUYVcKldjQBAClNtCOo1epXa20vQPisPgjHHvZpT4Wxn+MDdDjd PPjf8oOQKH6tSmxEBE+1UGM165qiXaE= X-Received: by 2002:a50:aa7c:: with SMTP id p57mr116794659edc.179.1561391803332; Mon, 24 Jun 2019 08:56:43 -0700 (PDT) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com. [209.85.128.49]) by smtp.gmail.com with ESMTPSA id me3sm1942965ejb.21.2019.06.24.08.56.42 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 08:56:42 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id v19so13898197wmj.5 for ; Mon, 24 Jun 2019 08:56:42 -0700 (PDT) X-Received: by 2002:a1c:f512:: with SMTP id t18mr16201190wmh.47.1561391801973; Mon, 24 Jun 2019 08:56:41 -0700 (PDT) MIME-Version: 1.0 References: <6819050.kFKQ8T6p8H@jernej-laptop> <3f9e51d5-8ca5-a439-943c-26de92dd52fe@samsung.com> In-Reply-To: <3f9e51d5-8ca5-a439-943c-26de92dd52fe@samsung.com> From: Chen-Yu Tsai Date: Mon, 24 Jun 2019 23:56:30 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] drm/sun4i: Enable DRM InfoFrame support on H6 To: Andrzej Hajda Cc: =?UTF-8?Q?Jernej_=C5=A0krabec?= , 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 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? ChenYu