diff mbox series

[RFC] drm/panel/simple-edp: Add Samsung ATNA45DC02

Message ID 20240717215847.5310-1-robdclark@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series [RFC] drm/panel/simple-edp: Add Samsung ATNA45DC02 | expand

Commit Message

Rob Clark July 17, 2024, 9:58 p.m. UTC
From: Rob Clark <robdclark@chromium.org>

Just a guess on the panel timings, but they appear to work.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
find any datasheet so timings is just a guess.  But AFAICT everything
works fine.

 drivers/gpu/drm/panel/panel-edp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Dmitry Baryshkov July 17, 2024, 10:11 p.m. UTC | #1
On Wed, Jul 17, 2024 at 02:58:46PM GMT, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
> 
> Just a guess on the panel timings, but they appear to work.
> 
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> find any datasheet so timings is just a guess.  But AFAICT everything
> works fine.

Could you please add EDID to the commit message?

> 
>  drivers/gpu/drm/panel/panel-edp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
> index 38e5178f55ac..411b7218af55 100644
> --- a/drivers/gpu/drm/panel/panel-edp.c
> +++ b/drivers/gpu/drm/panel/panel-edp.c
> @@ -1966,6 +1966,8 @@ static const struct edp_panel_entry edp_panels[] = {
>  	EDP_PANEL_ENTRY('S', 'H', 'P', 0x153a, &delay_200_500_e50, "LQ140T1JH01"),
>  	EDP_PANEL_ENTRY('S', 'H', 'P', 0x154c, &delay_200_500_p2e100, "LQ116M1JW10"),
>  
> +	EDP_PANEL_ENTRY('S', 'D', 'C', 0x4189, &delay_100_500_e200, "ATNA45DC02-0"),
> +
>  	EDP_PANEL_ENTRY('S', 'T', 'A', 0x0100, &delay_100_500_e200, "2081116HHD028001-51D"),
>  
>  	{ /* sentinal */ }
> -- 
> 2.45.2
>
Doug Anderson July 18, 2024, 12:17 a.m. UTC | #2
Hi,

On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
>
> From: Rob Clark <robdclark@chromium.org>
>
> Just a guess on the panel timings, but they appear to work.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> find any datasheet so timings is just a guess.  But AFAICT everything
> works fine.
>
>  drivers/gpu/drm/panel/panel-edp.c | 2 ++
>  1 file changed, 2 insertions(+)

Given that this is a Samsung ATNA<mumble>, is there any chance it's an
OLED panel? Should it be supported with the Samsung OLED panel driver
like this:

https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org

-Doug
Rob Clark July 18, 2024, 1:09 a.m. UTC | #3
On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> >
> > From: Rob Clark <robdclark@chromium.org>
> >
> > Just a guess on the panel timings, but they appear to work.
> >
> > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > ---
> > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > find any datasheet so timings is just a guess.  But AFAICT everything
> > works fine.
> >
> >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> >  1 file changed, 2 insertions(+)
>
> Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> OLED panel? Should it be supported with the Samsung OLED panel driver
> like this:
>
> https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org

it is an OLED panel, and I did see that patchset and thought that
samsung panel driver would work.  But changing the compat string on
the yoga dts only gave me a black screen (and I didn't see any of the
other mentioned problems with bl control or dpms with panel-edp).  So
:shrug:?  It could be I overlooked something else, but it _seems_ like
panel-edp is fine for this panel. Plus, it would avoid awkwardness if
it turned out there were other non-samsung 2nd sources, but so far
with a sample size of two 100% of these laptops have the same panel
;-)

But that was the reason for posting this as an RFC.  I was hoping
someone had some hint about where to find datasheets (my google'ing
was not successful), etc.

BR,
-R
Dmitry Baryshkov July 18, 2024, 12:31 p.m. UTC | #4
On Wed, Jul 17, 2024 at 06:09:29PM GMT, Rob Clark wrote:
> On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > >
> > > From: Rob Clark <robdclark@chromium.org>
> > >
> > > Just a guess on the panel timings, but they appear to work.
> > >
> > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > ---
> > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > works fine.
> > >
> > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> >
> > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > OLED panel? Should it be supported with the Samsung OLED panel driver
> > like this:
> >
> > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> 
> it is an OLED panel, and I did see that patchset and thought that
> samsung panel driver would work.  But changing the compat string on
> the yoga dts only gave me a black screen (and I didn't see any of the
> other mentioned problems with bl control or dpms with panel-edp).  So
> :shrug:?  It could be I overlooked something else, but it _seems_ like
> panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> it turned out there were other non-samsung 2nd sources, but so far
> with a sample size of two 100% of these laptops have the same panel
> ;-)
> 
> But that was the reason for posting this as an RFC.  I was hoping
> someone had some hint about where to find datasheets (my google'ing
> was not successful), etc.

Panelook has a datasheet for ATNA45DC01. It's behind a 'register new
business email' paywall.

> 
> BR,
> -R
Rob Clark July 18, 2024, 3:36 p.m. UTC | #5
On Thu, Jul 18, 2024 at 5:31 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Wed, Jul 17, 2024 at 06:09:29PM GMT, Rob Clark wrote:
> > On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > > >
> > > > From: Rob Clark <robdclark@chromium.org>
> > > >
> > > > Just a guess on the panel timings, but they appear to work.
> > > >
> > > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > > ---
> > > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > > works fine.
> > > >
> > > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > >
> > > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > > OLED panel? Should it be supported with the Samsung OLED panel driver
> > > like this:
> > >
> > > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> >
> > it is an OLED panel, and I did see that patchset and thought that
> > samsung panel driver would work.  But changing the compat string on
> > the yoga dts only gave me a black screen (and I didn't see any of the
> > other mentioned problems with bl control or dpms with panel-edp).  So
> > :shrug:?  It could be I overlooked something else, but it _seems_ like
> > panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> > it turned out there were other non-samsung 2nd sources, but so far
> > with a sample size of two 100% of these laptops have the same panel
> > ;-)
> >
> > But that was the reason for posting this as an RFC.  I was hoping
> > someone had some hint about where to find datasheets (my google'ing
> > was not successful), etc.
>
> Panelook has a datasheet for ATNA45DC01. It's behind a 'register new
> business email' paywall.

but it does not appear to have ATNA45DC02

fwiw, edid:

----------------
edid-decode (hex):

00 ff ff ff ff ff ff 00 4c 83 89 41 00 00 00 00
00 21 01 04 b5 1f 14 78 02 0b d1 af 51 3d b6 23
0b 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 1e cc 80 50 b0 30 10 74 08 20
88 00 38 c3 10 00 00 1b 1e cc 80 50 b0 30 50 70
08 20 88 00 38 c3 10 00 00 1b 00 00 00 fe 00 53
44 43 20 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 41 54 4e 41 34 35 44 43 30 32 2d 30 20 01 06

02 03 0f 00 e3 05 80 00 e6 06 05 01 8a 6a 02 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9c

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: SDC
    Model: 16777
    Made in: 2023
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 10
    DisplayPort interface
    Maximum image size: 31 cm x 20 cm
    Gamma: 2.20
    Supported color formats: RGB 4:4:4
    First detailed timing includes the native pixel format and
preferred refresh rate
  Color Characteristics:
    Red  : 0.6835, 0.3164
    Green: 0.2402, 0.7138
    Blue : 0.1396, 0.0439
    White: 0.3125, 0.3291
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  2944x1840   59.999173 Hz  16:10   172.798 kHz
522.540000 MHz (312 mm x 195 mm)
                 Hfront    8 Hsync  32 Hback   40 Hpol P
                 Vfront    8 Vsync   8 Vback 1024 Vpol N
    DTD 2:  2944x1840   89.998760 Hz  16:10   172.798 kHz
522.540000 MHz (312 mm x 195 mm)
                 Hfront    8 Hsync  32 Hback   40 Hpol P
                 Vfront    8 Vsync   8 Vback   64 Vpol N
    Alphanumeric Data String: 'SDC          '
    Alphanumeric Data String: 'ATNA45DC02-0 '
  Extension blocks: 1
Checksum: 0x06

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Native detailed modes: 0
  Colorimetry Data Block:
    BT2020RGB
  HDR Static Metadata Data Block:
    Electro optical transfer functions:
      Traditional gamma - SDR luminance range
      SMPTE ST2084
    Supported static metadata descriptors:
      Static metadata type 1
    Desired content max luminance: 138 (993.486 cd/m^2)
    Desired content max frame-average luminance: 106 (496.743 cd/m^2)
    Desired content min luminance: 2 (0.001 cd/m^2)
Checksum: 0x9c  Unused space in Extension Block: 112 bytes
----------------


BR,
-R


> >
> > BR,
> > -R
>
> --
> With best wishes
> Dmitry
Doug Anderson July 18, 2024, 3:57 p.m. UTC | #6
Hi,

On Wed, Jul 17, 2024 at 6:09 PM Rob Clark <robdclark@gmail.com> wrote:
>
> On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > >
> > > From: Rob Clark <robdclark@chromium.org>
> > >
> > > Just a guess on the panel timings, but they appear to work.
> > >
> > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > ---
> > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > works fine.
> > >
> > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> >
> > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > OLED panel? Should it be supported with the Samsung OLED panel driver
> > like this:
> >
> > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
>
> it is an OLED panel, and I did see that patchset and thought that
> samsung panel driver would work.  But changing the compat string on
> the yoga dts only gave me a black screen (and I didn't see any of the
> other mentioned problems with bl control or dpms with panel-edp).  So
> :shrug:?  It could be I overlooked something else, but it _seems_ like
> panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> it turned out there were other non-samsung 2nd sources, but so far
> with a sample size of two 100% of these laptops have the same panel

Hmm, OK. One question for you: are you using the "enable" GPIO in
panel-edp? IMO the code handling that GPIO in panel-edp is somewhat
dodgy, but it predates my deeper involvement with panels. I've never
seen an eDP panel that could use panel-edp where it was actually
required--every instance where someone thought it was required was
better modeled by using that GPIO as the backlight enable. On the
other hand, the "enable" GPIO in the Samsung OLED panel driver came
straight from the panel datasheet and it makes sense for it to be in
the panel driver since the backlight is handled straight by the
panel...

In any case, I guess if things are working it doesn't really hurt to
take it in panel-edp for now...


> But that was the reason for posting this as an RFC.  I was hoping
> someone had some hint about where to find datasheets (my google'ing
> was not successful), etc.

I don't personally have any hints.

-Doug
Rob Clark July 18, 2024, 4:25 p.m. UTC | #7
On Thu, Jul 18, 2024 at 9:00 AM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Wed, Jul 17, 2024 at 6:09 PM Rob Clark <robdclark@gmail.com> wrote:
> >
> > On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > > >
> > > > From: Rob Clark <robdclark@chromium.org>
> > > >
> > > > Just a guess on the panel timings, but they appear to work.
> > > >
> > > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > > ---
> > > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > > works fine.
> > > >
> > > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > >
> > > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > > OLED panel? Should it be supported with the Samsung OLED panel driver
> > > like this:
> > >
> > > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> >
> > it is an OLED panel, and I did see that patchset and thought that
> > samsung panel driver would work.  But changing the compat string on
> > the yoga dts only gave me a black screen (and I didn't see any of the
> > other mentioned problems with bl control or dpms with panel-edp).  So
> > :shrug:?  It could be I overlooked something else, but it _seems_ like
> > panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> > it turned out there were other non-samsung 2nd sources, but so far
> > with a sample size of two 100% of these laptops have the same panel
>
> Hmm, OK. One question for you: are you using the "enable" GPIO in
> panel-edp? IMO the code handling that GPIO in panel-edp is somewhat
> dodgy, but it predates my deeper involvement with panels. I've never
> seen an eDP panel that could use panel-edp where it was actually
> required--every instance where someone thought it was required was
> better modeled by using that GPIO as the backlight enable. On the
> other hand, the "enable" GPIO in the Samsung OLED panel driver came
> straight from the panel datasheet and it makes sense for it to be in
> the panel driver since the backlight is handled straight by the
> panel...

hmm, at least current dts doesn't have an enable gpio.  Which could be
why panel-samsung-atna33xc20 wasn't working.

It is entirely possible we are relying on something left on by the bootloader.

> In any case, I guess if things are working it doesn't really hurt to
> take it in panel-edp for now...
>

I wonder if using compatible="edp-panel" everywhere isn't a great idea
if we want to switch drivers later.  But I guess that is already water
under the bridge (so to speak)

BR,
-R

> > But that was the reason for posting this as an RFC.  I was hoping
> > someone had some hint about where to find datasheets (my google'ing
> > was not successful), etc.
>
> I don't personally have any hints.
>
> -Doug
>
Doug Anderson July 18, 2024, 4:31 p.m. UTC | #8
Hi,

On Thu, Jul 18, 2024 at 9:25 AM Rob Clark <robdclark@gmail.com> wrote:
>
> On Thu, Jul 18, 2024 at 9:00 AM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Wed, Jul 17, 2024 at 6:09 PM Rob Clark <robdclark@gmail.com> wrote:
> > >
> > > On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > > > >
> > > > > From: Rob Clark <robdclark@chromium.org>
> > > > >
> > > > > Just a guess on the panel timings, but they appear to work.
> > > > >
> > > > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > > > ---
> > > > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > > > works fine.
> > > > >
> > > > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > >
> > > > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > > > OLED panel? Should it be supported with the Samsung OLED panel driver
> > > > like this:
> > > >
> > > > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> > >
> > > it is an OLED panel, and I did see that patchset and thought that
> > > samsung panel driver would work.  But changing the compat string on
> > > the yoga dts only gave me a black screen (and I didn't see any of the
> > > other mentioned problems with bl control or dpms with panel-edp).  So
> > > :shrug:?  It could be I overlooked something else, but it _seems_ like
> > > panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> > > it turned out there were other non-samsung 2nd sources, but so far
> > > with a sample size of two 100% of these laptops have the same panel
> >
> > Hmm, OK. One question for you: are you using the "enable" GPIO in
> > panel-edp? IMO the code handling that GPIO in panel-edp is somewhat
> > dodgy, but it predates my deeper involvement with panels. I've never
> > seen an eDP panel that could use panel-edp where it was actually
> > required--every instance where someone thought it was required was
> > better modeled by using that GPIO as the backlight enable. On the
> > other hand, the "enable" GPIO in the Samsung OLED panel driver came
> > straight from the panel datasheet and it makes sense for it to be in
> > the panel driver since the backlight is handled straight by the
> > panel...
>
> hmm, at least current dts doesn't have an enable gpio.  Which could be
> why panel-samsung-atna33xc20 wasn't working.
>
> It is entirely possible we are relying on something left on by the bootloader.

That would be my best guess. Is there any way for you to find out if
there's an enable GPIO?


> > In any case, I guess if things are working it doesn't really hurt to
> > take it in panel-edp for now...
> >
>
> I wonder if using compatible="edp-panel" everywhere isn't a great idea
> if we want to switch drivers later.  But I guess that is already water
> under the bridge (so to speak)

For panels that aren't OLED it's all very standard and we're kinda
forced to use something generic since manufacturers want lots of 2nd
(and 3rd and 4th and ...) sourcing. As far as I've been able to tell
you can't do 2nd sourcing between OLED panels and other panels since
the wires hooked up to the panels are a little different for the OLED
panels and the power sequencing is a bit different. It would also be
pretty obvious to an end user if some of their devices had an OLED
panel and some didn't. I'm not aware of OLED panels other than the
Samsung ones, but I haven't done any real research here...

-Doug
Rob Clark July 18, 2024, 4:45 p.m. UTC | #9
On Thu, Jul 18, 2024 at 9:31 AM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Thu, Jul 18, 2024 at 9:25 AM Rob Clark <robdclark@gmail.com> wrote:
> >
> > On Thu, Jul 18, 2024 at 9:00 AM Doug Anderson <dianders@chromium.org> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jul 17, 2024 at 6:09 PM Rob Clark <robdclark@gmail.com> wrote:
> > > >
> > > > On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > > > > >
> > > > > > From: Rob Clark <robdclark@chromium.org>
> > > > > >
> > > > > > Just a guess on the panel timings, but they appear to work.
> > > > > >
> > > > > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > > > > ---
> > > > > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > > > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > > > > works fine.
> > > > > >
> > > > > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > > > > OLED panel? Should it be supported with the Samsung OLED panel driver
> > > > > like this:
> > > > >
> > > > > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> > > >
> > > > it is an OLED panel, and I did see that patchset and thought that
> > > > samsung panel driver would work.  But changing the compat string on
> > > > the yoga dts only gave me a black screen (and I didn't see any of the
> > > > other mentioned problems with bl control or dpms with panel-edp).  So
> > > > :shrug:?  It could be I overlooked something else, but it _seems_ like
> > > > panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> > > > it turned out there were other non-samsung 2nd sources, but so far
> > > > with a sample size of two 100% of these laptops have the same panel
> > >
> > > Hmm, OK. One question for you: are you using the "enable" GPIO in
> > > panel-edp? IMO the code handling that GPIO in panel-edp is somewhat
> > > dodgy, but it predates my deeper involvement with panels. I've never
> > > seen an eDP panel that could use panel-edp where it was actually
> > > required--every instance where someone thought it was required was
> > > better modeled by using that GPIO as the backlight enable. On the
> > > other hand, the "enable" GPIO in the Samsung OLED panel driver came
> > > straight from the panel datasheet and it makes sense for it to be in
> > > the panel driver since the backlight is handled straight by the
> > > panel...
> >
> > hmm, at least current dts doesn't have an enable gpio.  Which could be
> > why panel-samsung-atna33xc20 wasn't working.
> >
> > It is entirely possible we are relying on something left on by the bootloader.
>
> That would be my best guess. Is there any way for you to find out if
> there's an enable GPIO?

presumably it would be in the ACPI dump (which I've not much of a clue
what I'm looking for there)

BR,
-R

>
> > > In any case, I guess if things are working it doesn't really hurt to
> > > take it in panel-edp for now...
> > >
> >
> > I wonder if using compatible="edp-panel" everywhere isn't a great idea
> > if we want to switch drivers later.  But I guess that is already water
> > under the bridge (so to speak)
>
> For panels that aren't OLED it's all very standard and we're kinda
> forced to use something generic since manufacturers want lots of 2nd
> (and 3rd and 4th and ...) sourcing. As far as I've been able to tell
> you can't do 2nd sourcing between OLED panels and other panels since
> the wires hooked up to the panels are a little different for the OLED
> panels and the power sequencing is a bit different. It would also be
> pretty obvious to an end user if some of their devices had an OLED
> panel and some didn't. I'm not aware of OLED panels other than the
> Samsung ones, but I haven't done any real research here...
>
> -Doug
>
Rob Clark July 18, 2024, 6:01 p.m. UTC | #10
On Thu, Jul 18, 2024 at 9:45 AM Rob Clark <robdclark@gmail.com> wrote:
>
> On Thu, Jul 18, 2024 at 9:31 AM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Thu, Jul 18, 2024 at 9:25 AM Rob Clark <robdclark@gmail.com> wrote:
> > >
> > > On Thu, Jul 18, 2024 at 9:00 AM Doug Anderson <dianders@chromium.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jul 17, 2024 at 6:09 PM Rob Clark <robdclark@gmail.com> wrote:
> > > > >
> > > > > On Wed, Jul 17, 2024 at 5:19 PM Doug Anderson <dianders@chromium.org> wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On Wed, Jul 17, 2024 at 2:58 PM Rob Clark <robdclark@gmail.com> wrote:
> > > > > > >
> > > > > > > From: Rob Clark <robdclark@chromium.org>
> > > > > > >
> > > > > > > Just a guess on the panel timings, but they appear to work.
> > > > > > >
> > > > > > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > > > > > ---
> > > > > > > This adds the panel I have on my lenovo yoga slim 7x laptop.  I couldn't
> > > > > > > find any datasheet so timings is just a guess.  But AFAICT everything
> > > > > > > works fine.
> > > > > > >
> > > > > > >  drivers/gpu/drm/panel/panel-edp.c | 2 ++
> > > > > > >  1 file changed, 2 insertions(+)
> > > > > >
> > > > > > Given that this is a Samsung ATNA<mumble>, is there any chance it's an
> > > > > > OLED panel? Should it be supported with the Samsung OLED panel driver
> > > > > > like this:
> > > > > >
> > > > > > https://lore.kernel.org/r/20240715-x1e80100-crd-backlight-v2-0-31b7f2f658a3@linaro.org
> > > > >
> > > > > it is an OLED panel, and I did see that patchset and thought that
> > > > > samsung panel driver would work.  But changing the compat string on
> > > > > the yoga dts only gave me a black screen (and I didn't see any of the
> > > > > other mentioned problems with bl control or dpms with panel-edp).  So
> > > > > :shrug:?  It could be I overlooked something else, but it _seems_ like
> > > > > panel-edp is fine for this panel. Plus, it would avoid awkwardness if
> > > > > it turned out there were other non-samsung 2nd sources, but so far
> > > > > with a sample size of two 100% of these laptops have the same panel
> > > >
> > > > Hmm, OK. One question for you: are you using the "enable" GPIO in
> > > > panel-edp? IMO the code handling that GPIO in panel-edp is somewhat
> > > > dodgy, but it predates my deeper involvement with panels. I've never
> > > > seen an eDP panel that could use panel-edp where it was actually
> > > > required--every instance where someone thought it was required was
> > > > better modeled by using that GPIO as the backlight enable. On the
> > > > other hand, the "enable" GPIO in the Samsung OLED panel driver came
> > > > straight from the panel datasheet and it makes sense for it to be in
> > > > the panel driver since the backlight is handled straight by the
> > > > panel...
> > >
> > > hmm, at least current dts doesn't have an enable gpio.  Which could be
> > > why panel-samsung-atna33xc20 wasn't working.
> > >
> > > It is entirely possible we are relying on something left on by the bootloader.
> >
> > That would be my best guess. Is there any way for you to find out if
> > there's an enable GPIO?
>
> presumably it would be in the ACPI dump (which I've not much of a clue
> what I'm looking for there)
>

Ok, turns out it is wired up the same way as on the crd.. if I copy
those then panel-samsung-atna33xc20 is working

BR,
-R

> >
> > > > In any case, I guess if things are working it doesn't really hurt to
> > > > take it in panel-edp for now...
> > > >
> > >
> > > I wonder if using compatible="edp-panel" everywhere isn't a great idea
> > > if we want to switch drivers later.  But I guess that is already water
> > > under the bridge (so to speak)
> >
> > For panels that aren't OLED it's all very standard and we're kinda
> > forced to use something generic since manufacturers want lots of 2nd
> > (and 3rd and 4th and ...) sourcing. As far as I've been able to tell
> > you can't do 2nd sourcing between OLED panels and other panels since
> > the wires hooked up to the panels are a little different for the OLED
> > panels and the power sequencing is a bit different. It would also be
> > pretty obvious to an end user if some of their devices had an OLED
> > panel and some didn't. I'm not aware of OLED panels other than the
> > Samsung ones, but I haven't done any real research here...
> >
> > -Doug
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 38e5178f55ac..411b7218af55 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1966,6 +1966,8 @@  static const struct edp_panel_entry edp_panels[] = {
 	EDP_PANEL_ENTRY('S', 'H', 'P', 0x153a, &delay_200_500_e50, "LQ140T1JH01"),
 	EDP_PANEL_ENTRY('S', 'H', 'P', 0x154c, &delay_200_500_p2e100, "LQ116M1JW10"),
 
+	EDP_PANEL_ENTRY('S', 'D', 'C', 0x4189, &delay_100_500_e200, "ATNA45DC02-0"),
+
 	EDP_PANEL_ENTRY('S', 'T', 'A', 0x0100, &delay_100_500_e200, "2081116HHD028001-51D"),
 
 	{ /* sentinal */ }