Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5358576ybg; Tue, 22 Oct 2019 01:54:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLvDDNipqFCn98ijBYgSygr8+s2EWgLK+3Ce6ZcGAymbgHcnPZ/ndK09GckOzyRVTPQQo7 X-Received: by 2002:a50:fb0d:: with SMTP id d13mr6528730edq.200.1571734456526; Tue, 22 Oct 2019 01:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571734456; cv=none; d=google.com; s=arc-20160816; b=rn1SN2HX2D7h+Hc2d400rALksM5AzE+iWmYOOf19sIrMm9UOSqV/DHwym5oh/QJKgB UE5QUiUHRqluWtD1YsUMc3zJgbHzKNC8SpZhc3fxw3805f0kwEDk7y+CMvCxweQHDUHI nN4Jzwn5snwzEcsdQt9xN+9t3vAowCZmS7fklQ6PdzupkCZhRKrVE2B5Z9JV9zQloBsO ERzPe4rTQddM/QEKFpYNDaBQs30aRGpyYn0ZYX4GVAdT6OYw1hpWf5AYhkFwwSIWBwxZ 5wRLkDsYVNqD1ssjwvQDs++iokP5rkv89M1raIotCDSjtNKjiO1cLhefQZwMGTiG+jSI p0Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EpIbPyLJiW0xJnouuCwRPkxpgK7OWPXN5Ymgu9JHiHA=; b=nHdFg5i+O9NThEHFXhIfO6LO6lrIGlF7fsrnBWhE6weEWCXIeY6Cl6wDp8blbv2EtU R7pgZyOs2R1dnp0jRnTzfurFrA+FgDlOeFm0/+9zNV3oZqeNf8RqQVsAHuBkv3sFkO4k it2KxD8qnczQrvAIiR/SBIvF4hc5simX2NQav4MTk+K7xSRtsdMy+EXw+cgA/fZVMLKf A6cZ/WHiC19hWgU0Z0PbENI3E/4s2yUhznZuWlO7EyLUSjpxJNSftWuR27fJl6XeNxA8 lcq2yl/eNmXS5D6FCl4nUf7I7EY5tonuxUafbcMMuKLvGsS7m/mpyd0ErrCuDGdOYoGx KrfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=B9HyTM0I; 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 d44si4880186ede.149.2019.10.22.01.53.52; Tue, 22 Oct 2019 01:54:16 -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=@ffwll.ch header.s=google header.b=B9HyTM0I; 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 S2388047AbfJVIuy (ORCPT + 99 others); Tue, 22 Oct 2019 04:50:54 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:36429 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387479AbfJVIuy (ORCPT ); Tue, 22 Oct 2019 04:50:54 -0400 Received: by mail-ot1-f67.google.com with SMTP id c7so2713284otm.3 for ; Tue, 22 Oct 2019 01:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EpIbPyLJiW0xJnouuCwRPkxpgK7OWPXN5Ymgu9JHiHA=; b=B9HyTM0I+eVfwtkstGxQ65uPJqKWJnfhdWV6v/uQS3In3pRhIaSrkdc0974dc+lXJu q0YrPIWPoEyrc9O1XRZLVzd3yzM0Nwj+1YL9EhIJFEYi9nvpQSggzF6igw+51j66rOFk XixeX/xqAaPga96jY9SQyZJuHJ9izAYIOajzI= 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; bh=EpIbPyLJiW0xJnouuCwRPkxpgK7OWPXN5Ymgu9JHiHA=; b=aR+lP1UH0mXbYqzBSxC6jv5CH/aY1lmDgl56FcxfkdxzzoeKE9v39fgYAV+K8Gl6bB /6l8H0k9yOTw6IChgiiiS+uqBYu6DuKjV0l287rOXLuXebx5DJPYYGbt7QjOsthYyIzf M2rBdVQvVvKWtGaqHDAehXn1d7tC+J5NEhKT16X04rAO5O4amMqMXoWWMwg8Cnp4vivE COyQlEP6axu4P4w8Z4KoWzO/4QZ7oGIfdJwrbBzhCbRPynYcPZHPkMAb5lQxpUM7owFu xYOpjI4y/1keEL+RMPvp7fJDMCxRpdc/I5TgfABV+q8t0CVI40NZKohqOq3/pZGQ1sUB 5oRw== X-Gm-Message-State: APjAAAWJbSQepPQZHsJvoiiij3e70vqeVI7aqjKK9d3Q5zsa7ZLqQOmk dJcdHtbc33ikzhPXmhf4odJeYFeVfewJ2tgSI5MPHTISWjI= X-Received: by 2002:a9d:6343:: with SMTP id y3mr1701963otk.106.1571734253134; Tue, 22 Oct 2019 01:50:53 -0700 (PDT) MIME-Version: 1.0 References: <20191004143418.53039-4-mihail.atanassov@arm.com> <20191009055407.GA3082@jamwan02-TSP300> <5390495.Gzyn2rW8Nj@e123338-lin> <20191016162206.u2yo37rtqwou4oep@DESKTOP-E1NTVVP.localdomain> <20191017030752.GA3109@jamwan02-TSP300> <20191017082043.bpiuvfr3r4jngxtu@DESKTOP-E1NTVVP.localdomain> <20191017102055.GA8308@jamwan02-TSP300> <20191017104812.6qpuzoh5bx5i2y3m@DESKTOP-E1NTVVP.localdomain> <20191017114137.GC25745@shell.armlinux.org.uk> <20191022084210.GX11828@phenom.ffwll.local> <20191022084826.GP25745@shell.armlinux.org.uk> In-Reply-To: <20191022084826.GP25745@shell.armlinux.org.uk> From: Daniel Vetter Date: Tue, 22 Oct 2019 10:50:42 +0200 Message-ID: Subject: Re: [RFC,3/3] drm/komeda: Allow non-component drm_bridge only endpoints To: Russell King - ARM Linux admin Cc: Brian Starkey , nd , David Airlie , Liviu Dudau , "linux-kernel@vger.kernel.org" , "james qian wang (Arm Technology China)" , "dri-devel@lists.freedesktop.org" , Mihail Atanassov , Sean Paul 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 On Tue, Oct 22, 2019 at 10:48 AM Russell King - ARM Linux admin wrote: > > On Tue, Oct 22, 2019 at 10:42:10AM +0200, Daniel Vetter wrote: > > On Thu, Oct 17, 2019 at 12:41:37PM +0100, Russell King - ARM Linux admin wrote: > > > On Thu, Oct 17, 2019 at 10:48:12AM +0000, Brian Starkey wrote: > > > > On Thu, Oct 17, 2019 at 10:21:03AM +0000, james qian wang (Arm Technology China) wrote: > > > > > On Thu, Oct 17, 2019 at 08:20:56AM +0000, Brian Starkey wrote: > > > > > > On Thu, Oct 17, 2019 at 03:07:59AM +0000, james qian wang (Arm Technology China) wrote: > > > > > > > On Wed, Oct 16, 2019 at 04:22:07PM +0000, Brian Starkey wrote: > > > > > > > > > > > > > > > > If James is strongly against merging this, maybe we just swap > > > > > > > > wholesale to bridge? But for me, the pragmatic approach would be this > > > > > > > > stop-gap. > > > > > > > > > > > > > > > > > > > > > > This is a good idea, and I vote +ULONG_MAX :) > > > > > > > > > > > > > > and I also checked tda998x driver, it supports bridge. so swap the > > > > > > > wholesale to brige is perfect. :) > > > > > > > > > > > > > > > > > > > Well, as Mihail wrote, it's definitely not perfect. > > > > > > > > > > > > Today, if you rmmod tda998x with the DPU driver still loaded, > > > > > > everything will be unbound gracefully. > > > > > > > > > > > > If we swap to bridge, then rmmod'ing tda998x (or any other bridge > > > > > > driver the DPU is using) with the DPU driver still loaded will result > > > > > > in a crash. > > > > > > > > > > I haven't read the bridge code, but seems this is a bug of drm_bridge, > > > > > since if the bridge is still in using by others, the rmmod should fail > > > > > > > > > > > > > Correct, but there's no fix for that today. You can also take a look > > > > at the thread linked from Mihail's cover letter. > > > > > > > > > And personally opinion, if the bridge doesn't handle the dependence. > > > > > for us: > > > > > > > > > > - add such support to bridge > > > > > > > > That would certainly be helpful. I don't know if there's consensus on > > > > how to do that. > > > > > > > > > or > > > > > - just do the insmod/rmmod in correct order. > > > > > > > > > > > So, there really are proper benefits to sticking with the component > > > > > > code for tda998x, which is why I'd like to understand why you're so > > > > > > against this patch? > > > > > > > > > > > > > > > > This change handles two different connectors in komeda internally, compare > > > > > with one interface, it increases the complexity, more risk of bug and more > > > > > cost of maintainance. > > > > > > > > > > > > > Well, it's only about how to bind the drivers - two different methods > > > > of binding, not two different connectors. I would argue that carrying > > > > our out-of-tree patches to support both platforms is a larger > > > > maintenance burden. > > > > > > > > Honestly this looks like a win-win to me. We get the superior approach > > > > when its supported, and still get to support bridges which are more > > > > common. > > > > > > > > As/when improvements are made to the bridge code we can remove the > > > > component bits and not lose anything. > > > > > > There was an idea a while back about using the device links code to > > > solve the bridge issue - but at the time the device links code wasn't > > > up to the job. I think that's been resolved now, but I haven't been > > > able to confirm it. I did propose some patches for bridge at the > > > time but they probably need updating. > > > > I think the only patches that existed where for panel, and we only > > discussed the bridge case. At least I can only find patches for panel,not > > bridge, but might be missing something. > > I had a patches, which is why I raised the problem with the core: > > 6961edfee26d bridge hacks using device links > > but it never went further than an experiment at the time because of the > problems in the core. As it was a hack, it never got posted. Seems > that kernel tree (for the cubox) is still 5.2 based, so has a lot of > patches and might need updating to a more recent base before anything > can be tested. For reference, the panel patch: https://patchwork.kernel.org/patch/10364873/ And the huge discussion around bridges, that resulted in Rafael Wyzocki fixing all the core issues: https://www.spinics.net/lists/dri-devel/msg201927.html James, do you want to look into this for bridges? Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch