Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2799338ybd; Mon, 24 Jun 2019 12:54:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzz7jg1tkt5ymLKm1E06BeU9VOH9GFMU8HDTd+Cp+RjIh/9Q6cV6wiiGFpeR9F4PN8jSkpB X-Received: by 2002:a17:90a:214f:: with SMTP id a73mr26653381pje.21.1561406074871; Mon, 24 Jun 2019 12:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561406074; cv=none; d=google.com; s=arc-20160816; b=i3bcquloLnQt0brYeux53v7aLI6SCSM8ACSvQY2leBKs99AJ601AI14ITGT/YRv7F+ 3jYrY1SPCwp/zz9toua4QgJ52oXFRovKU9pCkY/qJWtzZwP+vZC/T1L0Rxq6gVcX+iKZ pHb1h/2+/1vx+8ExV1uhFBIlbedYAAWc+3Wkq2yl5GmcA++KQ0JYr7P4ywbf96kT9crD JYD6J2YugXg4tGN8sR2a7C8CtBo/2O4QfltEkAJwwjrrU5YECtKEUC6Tqhu5du7VjMKJ DlPECmrVEADqTzMgr5bilaFg+3m+ixBp/jqeChZLM8zgO/T88ID5agl+g02vD9zCP2M2 5HUQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OjQK5egU8v6p+UTJvShvtBZVF9ELuY2YcnQ7ISeqS3Y=; b=XWGP8RXPSz1VkaoS2oF7gcoIROOcukNGiliaxB79vZjJhfbeGR+JteC5UOmfP+zw29 11m9GMtSXhMBoXOOZBR0KMUCsYK9xv5MA51ohOUJmyf0DTI53ItI72TH6SWZNMcaGY35 oilj5oAWBCfK+iTPhZ6d1WUtsmTMT4s8Qvs8Pi82K+VocLHc0XbgQb4y9c096JBIDGon 8xiBV49349FF1mX+bSbDRVQrukRAcKDNO/ESasOX+zTthH8LWvCnH/l6fD21JWaNP9bz CWkKYxMz2taN9Em+F0g97N1NNRCfdoxGfLa4MemCneZLvA/uIRX6PpgY9pShpVlI6i/7 i8Zg== 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=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si1097052plr.124.2019.06.24.12.54.19; Mon, 24 Jun 2019 12:54:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731510AbfFXQDx convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Jun 2019 12:03:53 -0400 Received: from mailoutvs28.siol.net ([185.57.226.219]:43075 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727282AbfFXQDw (ORCPT ); Mon, 24 Jun 2019 12:03:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 856D25217DD; Mon, 24 Jun 2019 18:03:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5-irDH8c65qw; Mon, 24 Jun 2019 18:03:47 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 191D3521B78; Mon, 24 Jun 2019 18:03:47 +0200 (CEST) Received: from jernej-laptop.localnet (cpe-86-58-52-202.static.triera.net [86.58.52.202]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Postfix) with ESMTPA id DB4C25217DD; Mon, 24 Jun 2019 18:03:45 +0200 (CEST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Chen-Yu Tsai 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" Subject: Re: [PATCH 4/4] drm/sun4i: Enable DRM InfoFrame support on H6 Date: Mon, 24 Jun 2019 18:03:45 +0200 Message-ID: <44611965.cJa5QBey4U@jernej-laptop> In-Reply-To: References: <3f9e51d5-8ca5-a439-943c-26de92dd52fe@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Best regards, Jernej