All of lore.kernel.org
 help / color / mirror / Atom feed
From: moinejf@free.fr (Jean-Francois Moine)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 2/2] drm: sunxi: Add a basic DRM driver for Allwinner DE2
Date: Wed, 13 Jan 2016 18:37:30 +0100	[thread overview]
Message-ID: <20160113183730.9f0221a1cd48d9e094000da6@free.fr> (raw)
In-Reply-To: <568D7BFA.30802@gmx.de>

On Wed, 6 Jan 2016 21:41:30 +0100
Jens Kuske <jenskuske@gmx.de> wrote:

> On 05/01/16 19:40, Jean-Francois Moine wrote:
> [snip]
> > diff --git a/drivers/gpu/drm/sunxi/de2_hdmi_h3.c b/drivers/gpu/drm/sunxi/de2_hdmi_h3.c
> > new file mode 100644
> > index 0000000..c54b090
> > --- /dev/null
> > +++ b/drivers/gpu/drm/sunxi/de2_hdmi_h3.c
> > @@ -0,0 +1,478 @@
> > +/*
> > + * Allwinner H3 HDMI lowlevel functions
> > + *
> > + * Copyright (C) 2016 Jean-Francois Moine <moinejf@free.fr>
> > + *
> > + * Adapted from the file
> > + *	lichee/linux-3.4/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
> > + * with no license nor copyright.
> > + */
	[snip]
> > +/*
> > + * [0] = vic (cea Video ID)
> > + * [1] used in hdmi_phy_set / bsp_hdmi_audio
> > + * [2..17] used in bsp_hdmi_video
> > + */
> > +static const struct para_tab ptbl[] = {
> > +	{{  6,  1, 1,  1,  5,  3, 0, 1, 4, 0, 0, 160,  20,  38, 124, 240, 22, 0, 0}},
	[snip]

> did you try to figure out what the values in this table actually mean?
> 
> I tried it some time ago because I wanted to add some more resolutions
> to 3.4, but never got further than what I'll add below. But it might be
> useful now, to get rid of at least some of the magic constants.
> With some more work (what does [1] mean?) we might be able to drop the
> entire table and use the values from drm_display_mode directly instead.
> 
> unsure (hard to verify):
> [2] = pixel repetition (1 = 2x)
> [3] = bit0: interlaced (no idea about the 96/0x60 yet)
> [17] = something csc related
> [18] = unused
> 
> pretty sure (verified by comparing with timings):
> [4] = horizontal active (high byte)
> [5] = vsync width
> [6] = vertical active (high byte)
> [7] = horizontal blanking (high byte)
> [8] = vertical front porch
> [9] = horizontal front porch (high byte)
> [10] = hsync width (high byte)
> [11] = horizontal active (low byte)
> [12] = horizontal blanking (low byte)
> [13] = horizontal front porch (low byte)
> [14] = hsync width (low byte)
> [15] = vertical active (low byte)
> [16] = vertical blanking
> 
> Generally, nice work. I only skimmed over it by now, but I hope to test
> and review the hardware related parts more intensively sometime.

Hi Jens,

Thanks for this information, but this table is only a very small part
of the HDMI code.

I doubt that anyone could understand the other sequences of the
functions of this BSP without documentation, or could do some reverse
engineering and understand how the DE2 HDMI device works.

So, I think that we have to wait for some information and/or
authorisation from Allwinner before putting a HDMI driver for the H3
(and A83T, A64...) into the mainline.

-- 
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Francois Moine <moinejf@free.fr>
To: Jens Kuske <jenskuske@gmx.de>
Cc: dri-devel@lists.freedesktop.org,
	"Emilio López" <emilio@elopez.com.ar>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 2/2] drm: sunxi: Add a basic DRM driver for Allwinner DE2
Date: Wed, 13 Jan 2016 18:37:30 +0100	[thread overview]
Message-ID: <20160113183730.9f0221a1cd48d9e094000da6@free.fr> (raw)
In-Reply-To: <568D7BFA.30802@gmx.de>

On Wed, 6 Jan 2016 21:41:30 +0100
Jens Kuske <jenskuske@gmx.de> wrote:

> On 05/01/16 19:40, Jean-Francois Moine wrote:
> [snip]
> > diff --git a/drivers/gpu/drm/sunxi/de2_hdmi_h3.c b/drivers/gpu/drm/sunxi/de2_hdmi_h3.c
> > new file mode 100644
> > index 0000000..c54b090
> > --- /dev/null
> > +++ b/drivers/gpu/drm/sunxi/de2_hdmi_h3.c
> > @@ -0,0 +1,478 @@
> > +/*
> > + * Allwinner H3 HDMI lowlevel functions
> > + *
> > + * Copyright (C) 2016 Jean-Francois Moine <moinejf@free.fr>
> > + *
> > + * Adapted from the file
> > + *	lichee/linux-3.4/drivers/video/sunxi/disp2/hdmi/aw/hdmi_bsp_sun8iw7.c
> > + * with no license nor copyright.
> > + */
	[snip]
> > +/*
> > + * [0] = vic (cea Video ID)
> > + * [1] used in hdmi_phy_set / bsp_hdmi_audio
> > + * [2..17] used in bsp_hdmi_video
> > + */
> > +static const struct para_tab ptbl[] = {
> > +	{{  6,  1, 1,  1,  5,  3, 0, 1, 4, 0, 0, 160,  20,  38, 124, 240, 22, 0, 0}},
	[snip]

> did you try to figure out what the values in this table actually mean?
> 
> I tried it some time ago because I wanted to add some more resolutions
> to 3.4, but never got further than what I'll add below. But it might be
> useful now, to get rid of at least some of the magic constants.
> With some more work (what does [1] mean?) we might be able to drop the
> entire table and use the values from drm_display_mode directly instead.
> 
> unsure (hard to verify):
> [2] = pixel repetition (1 = 2x)
> [3] = bit0: interlaced (no idea about the 96/0x60 yet)
> [17] = something csc related
> [18] = unused
> 
> pretty sure (verified by comparing with timings):
> [4] = horizontal active (high byte)
> [5] = vsync width
> [6] = vertical active (high byte)
> [7] = horizontal blanking (high byte)
> [8] = vertical front porch
> [9] = horizontal front porch (high byte)
> [10] = hsync width (high byte)
> [11] = horizontal active (low byte)
> [12] = horizontal blanking (low byte)
> [13] = horizontal front porch (low byte)
> [14] = hsync width (low byte)
> [15] = vertical active (low byte)
> [16] = vertical blanking
> 
> Generally, nice work. I only skimmed over it by now, but I hope to test
> and review the hardware related parts more intensively sometime.

Hi Jens,

Thanks for this information, but this table is only a very small part
of the HDMI code.

I doubt that anyone could understand the other sequences of the
functions of this BSP without documentation, or could do some reverse
engineering and understand how the DE2 HDMI device works.

So, I think that we have to wait for some information and/or
authorisation from Allwinner before putting a HDMI driver for the H3
(and A83T, A64...) into the mainline.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-01-13 17:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 19:15 [PATCH RFC 0/2] Add a display driver to the Allwinner H3 Jean-Francois Moine
2016-01-05 19:15 ` Jean-Francois Moine
2016-01-05 18:28 ` [PATCH RFC 1/2] clk: sunxi: Add sun8i display support Jean-Francois Moine
2016-01-05 18:28   ` Jean-Francois Moine
2016-01-06  2:39   ` Chen-Yu Tsai
2016-01-06  2:39     ` Chen-Yu Tsai
2016-01-08 17:50     ` Jean-Francois Moine
2016-01-08 17:50       ` Jean-Francois Moine
2016-01-18 19:09   ` Maxime Ripard
2016-01-18 19:09     ` Maxime Ripard
2016-01-19  8:09     ` Jean-Francois Moine
2016-01-19  8:09       ` Jean-Francois Moine
2016-01-27 21:50       ` Maxime Ripard
2016-01-27 21:50         ` Maxime Ripard
2016-01-28 14:55         ` Jean-Francois Moine
2016-01-28 14:55           ` Jean-Francois Moine
2016-01-05 18:40 ` [PATCH RFC 2/2] drm: sunxi: Add a basic DRM driver for Allwinner DE2 Jean-Francois Moine
2016-01-05 18:40   ` Jean-Francois Moine
2016-01-05 20:38   ` Russell King - ARM Linux
2016-01-05 20:38     ` Russell King - ARM Linux
2016-01-11 18:56     ` Jean-Francois Moine
2016-01-11 18:56       ` Jean-Francois Moine
2016-01-06 20:41   ` Jens Kuske
2016-01-06 20:41     ` Jens Kuske
2016-01-13 17:37     ` Jean-Francois Moine [this message]
2016-01-13 17:37       ` Jean-Francois Moine
2016-01-06 21:20 ` [PATCH RFC 0/2] Add a display driver to the Allwinner H3 Maxime Ripard
2016-01-06 21:20   ` Maxime Ripard
2016-01-08 17:13   ` Jean-Francois Moine
2016-01-08 17:13     ` Jean-Francois Moine
2016-01-18 10:18     ` Maxime Ripard
2016-01-18 10:18       ` Maxime Ripard
2016-01-19  8:49       ` Jean-Francois Moine
2016-01-19  8:49         ` Jean-Francois Moine
2016-02-02 16:58         ` Maxime Ripard
2016-02-02 16:58           ` Maxime Ripard

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=20160113183730.9f0221a1cd48d9e094000da6@free.fr \
    --to=moinejf@free.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.