All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Yuti Amonkar <yamonkar@cadence.com>, Sekhar Nori <nsekhar@ti.com>,
	dri-devel@lists.freedesktop.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Swapnil Jakhade <sjakhade@cadence.com>,
	Nikhil Devshatwar <nikhil.nd@ti.com>
Subject: Re: [PATCH v4 5/7] drm/tidss: Set bus_format correctly from bridge/connector
Date: Fri, 4 Dec 2020 13:47:05 +0200	[thread overview]
Message-ID: <1ab0f05c-866b-c028-12c0-50766f2132e6@ti.com> (raw)
In-Reply-To: <20201204121235.4bbbe2eb@collabora.com>

On 04/12/2020 13:12, Boris Brezillon wrote:

>>> That'd be even better if you implement the bridge interface instead of
>>> the encoder one so we can get rid of the encoder_{helper}_funcs and use
>>> drm_simple_encoder_init().  
>>
>> I'm a bit confused here. What should be the design here...
>>
>> These formats need to be handled by the crtc (well, the display controller, which is modeled as the
>> crtc). Should we have a tidss_crtc.c file, which implements a crtc, a simple encoder and a bridge?
>> And just consider those three DRM components as different API parts of the display controller?
> 
> The idea is to hide the encoder abstraction from drivers as much as we
> can. We have to keep the encoder concept because that's what we expose
> to userspace, but drivers shouldn't have to worry about the distinction
> between the first bridge in the chain (what we currently call encoders)
> and other bridges. The bridge interface provides pretty much the same
> functionality, so all you need to do is turn your encoder driver into a
> bridge driver (see what we did for
> drivers/gpu/drm/imx/parallel-display.c), the only particularity here is
> that the bridge knows it's the first in the chain, and has access to
> the CRTC it's directly connected to.

With a quick look, the imx parallel-display.c seems to be really part of the crtc. Shouldn't we then
take one more step forward, and just combine the crtc, encoder and bridge (somehow)? That's kind of
what parallel-display.c is doing, isn't it? It's directly poking the crtc state, but the code just
happens to be in a separate file from the crtc.

Thinking about the TI HW, we have a bunch of internal IPs which are clearly bridges: HDMI, DSI,
which get the pixel data from the display controller, and they have their own registers, so clearly
independent bridges.

Then we have MIPI DPI, which doesn't really have its own registers, as it's just plain parallel RGB,
the same as what is sent to e.g. HDMI and DSI bridges. However, there might be some muxes or
regulators to set up to get the external signals working. So a bridge would be ok here too to handle
that external side.

But in all the above cases, we have the display controller (crtc), which in all the cases needs to
do e.g. pixel/bus format configuration. So why add direct crtc poking into the first bridges (HDMI,
DSI, DPI), when we could just model the crtc as a bridge, and thus the first bridges wouldn't need
to touch the crtc.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-12-04 11:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 12:18 [PATCH v4 0/7] drm/tidss: Use new connector model for tidss Nikhil Devshatwar
2020-12-01 12:18 ` [PATCH v4 1/7] drm/bridge: tfp410: Support format negotiation hooks Nikhil Devshatwar
2020-12-01 12:18 ` [PATCH v4 2/7] drm/bridge: tfp410: Set input_bus_flags in atomic_check Nikhil Devshatwar
2020-12-01 14:29   ` kernel test robot
2020-12-01 14:29     ` kernel test robot
2020-12-03 12:50   ` [PATCH v5] " Nikhil Devshatwar
2020-12-04 10:31     ` Boris Brezillon
2020-12-01 12:18 ` [PATCH v4 3/7] drm/bridge: mhdp8546: Add minimal format negotiation Nikhil Devshatwar
2020-12-04 10:33   ` Boris Brezillon
2020-12-01 12:18 ` [PATCH v4 4/7] drm/bridge: mhdp8546: Set input_bus_flags from atomic_check Nikhil Devshatwar
2020-12-04 10:32   ` Boris Brezillon
2020-12-07 13:23     ` Nikhil Devshatwar
2020-12-04 10:42   ` Boris Brezillon
2020-12-07 13:25     ` Nikhil Devshatwar
2020-12-01 12:18 ` [PATCH v4 5/7] drm/tidss: Set bus_format correctly from bridge/connector Nikhil Devshatwar
2020-12-04 10:50   ` Boris Brezillon
2020-12-04 10:56     ` Tomi Valkeinen
2020-12-04 11:12       ` Boris Brezillon
2020-12-04 11:47         ` Tomi Valkeinen [this message]
2020-12-04 13:54           ` Boris Brezillon
2020-12-04 14:19             ` Tomi Valkeinen
2023-03-30 17:17     ` Francesco Dolcini
2023-04-14  7:49       ` Aradhya Bhatia
2023-04-14  8:30         ` Francesco Dolcini
2023-04-14 20:18           ` Aradhya Bhatia
2020-12-01 12:18 ` [PATCH v4 6/7] drm/tidss: Move to newer connector model Nikhil Devshatwar
2020-12-01 12:18 ` [PATCH v4 7/7] drm/bridge: cdns-mhdp8546: Fix the interrupt enable/disable Nikhil Devshatwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ab0f05c-866b-c028-12c0-50766f2132e6@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=nikhil.nd@ti.com \
    --cc=nsekhar@ti.com \
    --cc=sjakhade@cadence.com \
    --cc=yamonkar@cadence.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.