From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585AbdK1SV3 (ORCPT ); Tue, 28 Nov 2017 13:21:29 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:37926 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbdK1SV1 (ORCPT ); Tue, 28 Nov 2017 13:21:27 -0500 X-Google-Smtp-Source: AGs4zMZzTMUQJe2Pil0rUvhT4s1lLZxdiyhrbGnK1zl3geR2Zzf4NK7mJHfBF52eBX/bo6huKhrMtg== Date: Tue, 28 Nov 2017 10:21:23 -0800 From: Brian Norris To: Laurent Pinchart Cc: Archit Taneja , Andrzej Hajda , David Airlie , Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sean Paul , Nickey Yang , hl@rock-chips.com, linux-rockchip@lists.infradead.org, mka@chromium.org, Jeffy Chen , Doug Anderson Subject: Re: [PATCH] drm/bridge/synopsis: stop clobbering drvdata Message-ID: <20171128182121.GA116479@google.com> References: <20171128010538.119114-1-briannorris@chromium.org> <1743921.AofnJoQ8Rz@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1743921.AofnJoQ8Rz@avalon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Tue, Nov 28, 2017 at 02:51:46PM +0200, Laurent Pinchart wrote: > Hi Brian, > > Thank you for the patch. > > I'd mention dw-mipi-dsi in the subject line as the directory contains the dw- > hdmi driver as well that this patch doesn't touch. Yep. Does it need another tag in the subject? e.g., '.../dw-mipi-dsi:'? > On Tuesday, 28 November 2017 03:05:38 EET Brian Norris wrote: > > Bridge drivers/helpers shouldn't be clobbering the drvdata, since a > > parent driver might need to own this. > > By parent driver I assume you mean a glue driver that binds to the SoC- > specific compatible string for the DSI transmitter. Indeed. Nickey picked this up for his Rockchip driver submission, but maybe we should reword the commit message a bit. > > Instead, let's return our > > 'dw_mipi_dsi' object and have callers pass that back to us for removal. > > > > Signed-off-by: Brian Norris > > Wouldn't it be cleaner to embed the dw_mipi_dsi structure in the parent- > specific data structure (struct dw_mipi_dsi_stm and struct > dw_mipi_dsi_rockchip when the "[PATCH v3 0/5] Update ROCKCHIP DSI driver that > uses dw-mipi-dsi bridge" patch series will land) instead of allocating it > dynamically ? We would then have a single object to track. I suppose we could do that too. But that would require exposing the whole layout of 'struct dw_mipi_dsi' to users. Do we want to sacrifice the enforced separation for a little bit of nicer object handling? Also, this was modeled a bit after the similar rework needed to untangle the drvdata handling in the Rockchip analogix DP driver vs. the analogix bridge DP code: [PATCH v6 03/10] drm/bridge: analogix: Do not use device's drvdata https://patchwork.kernel.org/patch/10015875/ Brian