Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5774228ybp; Tue, 8 Oct 2019 08:07:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxCE2/PduxBkyPEMMv4dKU14k1RIJBO4bPymrtskInvhu6+I1SN7CrdX4GDqMPSmqewiT/ X-Received: by 2002:a50:98c6:: with SMTP id j64mr34816467edb.34.1570547228388; Tue, 08 Oct 2019 08:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570547228; cv=none; d=google.com; s=arc-20160816; b=ygxOr1Ha6lKnLfcb6W8jZzbJxXadXgJ2uXIkW7hsHq8KDf0IlkKGGfsQGRXC6W1DP2 fz5ps31DH+PaY9byw+PoeJ5lpP7fTU+6tv3GDTtozUaQ03qw7ZIGAezjkRWfsG10JsO4 4faM8KDkMbcoYTQVbS0As7g3SQEsIDT7Iez8Gc0pzjoYjBuO6MehZJ+0Q6g7HUdmF50r Ui3hTFch+RouGUNzydFN/sDJ3/mBkw+SNd37gJmmKXt8xBnKC6tPS3EK4603RfI71smX 0eDStYDM8yMNRmAIsqdC1pyLoYB1nzE+LQ+pPWPl3iPwpa5bkk3QE/6sHUDEYCSqIIBt 0r2w== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nZTSIKqLe1Xh/tE/i1buAM4aJM5s7zBbM3sshp8Umhc=; b=vbsuMLT6PC5N4fLWWaqbYYQfzSx3paaHSW9lA9VKBIe/U1vafgaiuuc9CAYl4bgcNS 4F6ae4U/Mt8Cev8rPSEEj0eSZ+ZG0mtLzjwSFDmWqorkY3IT8G53v7p+66B8nUDsg2km EWbjcdIPrcMifgcxcUNW+tIADalMWDFQGrs4otFioKXL3GeOA6TuU+TOaRHTWGdfUcOa V/M7Bqoe8iWV+WD2Rz/rPCv/obaNj7bpNUeQUC8jdBhRFyQfraNSO2aBoezvn4uPEvBM 5SeIZ0yRO16RXsK6zTlLfM3ef5BWKDw4GsPLDqqi1h9JR0R8nWg316mAZlbF/KUco7pU tdSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=dhhnvkQg; 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 t18si7810943ejr.440.2019.10.08.08.06.43; Tue, 08 Oct 2019 08:07:08 -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; dkim=pass header.i=@poorly.run header.s=google header.b=dhhnvkQg; 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 S1727503AbfJHPDA (ORCPT + 99 others); Tue, 8 Oct 2019 11:03:00 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:33053 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbfJHPC7 (ORCPT ); Tue, 8 Oct 2019 11:02:59 -0400 Received: by mail-yb1-f196.google.com with SMTP id w141so5449591ybe.0 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=NDJHfhx2zFwm5bEDsea38WHm2ISDF5+Tb/dUv+GGfRnYEAeegWvbuCyhDw/lj3+3dY A93Ap0hJAhXo2JgAHEOCN0AksIolBA4yRaUP+rvBSZfBUEFrECzgQ1uKwmzZLmnIi4vm +dYUsYdo/51jpc3QwK484/Valz1X6WGloVA7X3hSfEjqbt544qbEpylLTFp0Ou6YyiaS FsAlV0oqWI28Z9oXqdN8ULcmkqujCKeFWZSZfzaq5sj16ly68TWnxcjPqm6mJDHdsi11 IH1aOzD9tjT6eb0hC2pTJ55OTIvDifbO0dTB1fr/OEa+d9aQsSr8KbaQ7/kTLZfqC4lq 9L3w== X-Gm-Message-State: APjAAAXdodW3WIZaJ5w1Ht935Qhoip5nSjK1ha5vX0DUBvPc+EJRH8YR D6ZDmmV65K4Tbgo72xezyItZtQ== 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 ." Cc: Sean Paul , "james qian wang (Arm Technology China)" , "linux-kernel@vger.kernel.org" , Maxime Ripard , Sam Ravnborg , "intel-gfx@lists.freedesktop.org" , David Airlie , Thierry Reding , Matthias Brugger , "dri-devel@lists.freedesktop.org" , Rodrigo Vivi , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , nd 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-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 /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