From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93822C4360C for ; Tue, 8 Oct 2019 15:03:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 66D382070B for ; Tue, 8 Oct 2019 15:03:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="els3yLtw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=poorly.run header.i=@poorly.run header.b="dhhnvkQg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66D382070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jgaRt/MDObf5hFNthcdB/sbOSEXZgnRUYvTDyfP6zio=; b=els3yLtwH83RSH wEFJ7Du4nZzdbo64HAte/Q8KmWtgBWuopSrmnUL+tRhSRUVstzGf0Av7PMZB7mIxgVKisi50aDdhC BeUTobeeIc4WiyOTleP5fLeW72mZB+5C8yK9h5MzSkrqwQilayzatrUaP+DapjV/yPC1Q099w4qVL +MgChu/6M9wxF33osPupAECBy5B95EyarRY6VgaIv3vEhVA4cmH7Fv7M6uKfh0zyZnLl9JpFgyLYg qJoVZdSTfx9WBYK3/TVCmRkxdmYMJHXAaQanFhSrRBYIybm5adaQJYzzwtsLNs8vKietvbzLLeliz kBq0RR3rwkiM2Qqiigew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHr10-0007pt-04; Tue, 08 Oct 2019 15:03:06 +0000 Received: from mail-yb1-xb43.google.com ([2607:f8b0:4864:20::b43]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHr0w-0007nx-6f for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2019 15:03:03 +0000 Received: by mail-yb1-xb43.google.com with SMTP id h202so5987084ybg.13 for ; Tue, 08 Oct 2019 08:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nZTSIKqLe1Xh/tE/i1buAM4aJM5s7zBbM3sshp8Umhc=; b=dhhnvkQgwFWhCMKQ+XWonnecZzsSaVFVBPrCxe2TMcLGkg5PNZb0wW8wLsONDEKG/Q rWf9Ir2IRavbsOX42BgmynaM/qEn8Yc2zJputvpdjVW9LWkzzHYFFfirCWRbAopX8LR3 o3ugcF8CWEoDnsZPD0YhgVQyISOrfeIXK3IPVnVGgbrqr8CEv15mHvpjHW4yG6IDped1 kBKP4vmgM+mwB+FUgy5nEQRmPz1iGWJMYeCW9q4MW9WqXOrPbXO2tdQjUSS7XpZZFI2m u4c5UPYbjez2vEFAV0S81/W069RicABkUfiH9j5Ce9Y9XC1138v0KD83LSj/NpnHXOOu Wk6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nZTSIKqLe1Xh/tE/i1buAM4aJM5s7zBbM3sshp8Umhc=; b=fA+m1aAfoFmyfV4qOqsExb0k3rFQERE8se4n0/vbdMZrzMlok5ZGaq0jYJw9k/kAb/ P+gN32DOVn5w3awJ8GUuJUt4REzS5PY04DOj51yWWNGOZHTGkRogjhogpItmE374zrMZ pikYeRNHxmCA9Dr8IlcgbgbckPMjj2ev/iSWH9AbbYPcqduX88AaiNs717APs4EFMMRV 9v/clTztSD+jcanjyzsqgaLjFmdoKb5PFg5hCnmtMlCW+7ebWckpQHfxC/VqVQX/0e0z 4Xh8BbZksW/BXNZD7Nhar0C1ZVqSrKu5Sb+opjOlHhizs6yfOB0GtOehsXNQPQBacXV4 Vdgw== X-Gm-Message-State: APjAAAUhjr3H67NAM6cST3IrGzRw/vbuhURltX0Fu79DNGcC8vLVixy/ KLTcCH6Mt44ib6MuMiA0X//Ppg== X-Google-Smtp-Source: APXvYqy39p5S3WFZZT7NiYaub1fXy7Bu93rQKzD9kNuqH+MdsdnurfzRi4Ts2yLz/4adcpC4DJClcA== X-Received: by 2002:a25:c504:: with SMTP id v4mr14307259ybe.375.1570546978393; Tue, 08 Oct 2019 08:02:58 -0700 (PDT) Received: from localhost ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id g20sm4699956ywe.98.2019.10.08.08.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 08:02:57 -0700 (PDT) Date: Tue, 8 Oct 2019 11:02:57 -0400 From: Sean Paul To: "dbasehore ." Subject: Re: [v8,2/4] drm/panel: set display info in panel attach Message-ID: <20191008150257.GB85762@art_vandelay> References: <20190925225833.7310-3-dbasehore@chromium.org> <20190929052307.GA28304@jamwan02-TSP300> <20191007164441.GB126146@art_vandelay> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191008_080302_244048_3981E8BA X-CRM114-Status: GOOD ( 22.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Sam Ravnborg , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , David Airlie , Thierry Reding , "james qian wang \(Arm Technology China\)" , Rodrigo Vivi , Matthias Brugger , "linux-mediatek@lists.infradead.org" , nd , Sean Paul , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org /snip > > > > > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h > > > > > index d16158deacdc..f3587a54b8ac 100644 > > > > > --- a/include/drm/drm_panel.h > > > > > +++ b/include/drm/drm_panel.h > > > > > @@ -141,6 +141,56 @@ struct drm_panel { > > > > > */ > > > > > const struct drm_panel_funcs *funcs; > > > > > > > > > > > > > All these new added members seems dupliated with drm_display_info, > > > > So I think, can we add a new drm_plane_funcs func: > > > > > > > > int (*set_display_info)(struct drm_panel *panel, > > > > struct drm_display_info *info); > > > > > > I don't disagree personally, since I originally wrote it this way, but > > > 2 maintainers, Daniel Vetter and Thierry Reding, requested that it be > > > changed. Unless that decision is reversed, I won't be changing this. > > > > > > > Reading back the feedback on v1, I don't think anyone said they were against > > storing a drm_display_info struct in drm_panel (no one really weighed in on > > it one way or another). IMO duplicating a bunch of fields feels pretty icky. > > Thanks for the review. Should we duplicate the entire struct, or just > create a sub-struct, say, physical_properties that will be part of > drm_display_info and drm_panel? That's a good idea, but I think you can use the entire struct. Everything has reasonable default values and I think it might be difficult to draw a line in the sand as to which fields will or won't be useful for panels going forward. Best for drivers to just treat the info in drm_display_info as best effort and have good defaults IMO. Sean > > > > > I think most fields in drm_display_info have pretty reasonable defaults, so I'd > > recommend just storing a copy in drm_panel. As Thierry suggests, we can > > populate the dt parts in probe (orientation) and then copy over all or a subset > > of the struct to connector on attach. > > > > Sean > > > > > > > > > > Then in drm_panel_attach(), via this interface the specific panel > > > > driver can directly set connector->display_info. like > > > > > > > > ... > > > > if (panel->funcs && panel->funcs->set_display_info) > > > > panel->funcs->unprepare(panel, connector->display_info); > > > > ... > > > > > > > > Thanks > > > > James > > > > > > > > > + /** > > > > > + * @width_mm: > > > > > + * > > > > > + * Physical width in mm. > > > > > + */ > > > > > + unsigned int width_mm; > > > > > + > > > > > + /** > > > > > + * @height_mm: > > > > > + * > > > > > + * Physical height in mm. > > > > > + */ > > > > > + unsigned int height_mm; > > > > > + > > > > > + /** > > > > > + * @bpc: > > > > > + * > > > > > + * Maximum bits per color channel. Used by HDMI and DP outputs. > > > > > + */ > > > > > + unsigned int bpc; > > > > > + > > > > > + /** > > > > > + * @orientation > > > > > + * > > > > > + * Installation orientation of the panel with respect to the chassis. > > > > > + */ > > > > > + int orientation; > > > > > + > > > > > + /** > > > > > + * @bus_formats > > > > > + * > > > > > + * Pixel data format on the wire. > > > > > + */ > > > > > + const u32 *bus_formats; > > > > > + > > > > > + /** > > > > > + * @num_bus_formats: > > > > > + * > > > > > + * Number of elements pointed to by @bus_formats > > > > > + */ > > > > > + unsigned int num_bus_formats; > > > > > + > > > > > + /** > > > > > + * @bus_flags: > > > > > + * > > > > > + * Additional information (like pixel signal polarity) for the pixel > > > > > + * data on the bus. > > > > > + */ > > > > > + u32 bus_flags; > > > > > + > > > > > /** > > > > > * @list: > > > > > * > > > > > > Thanks for the review > > > > -- > > Sean Paul, Software Engineer, Google / Chromium OS -- Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel