<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/tilcdc, branch v5.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-03-24T10:05:28Z</updated>
<entry>
<title>drm/tilcdc: fix pixel clock setting warning message</title>
<updated>2021-03-24T10:05:28Z</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-03-22T21:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=976677b5958ef7f9973ea8ba952a96b7243f2c13'/>
<id>urn:sha1:976677b5958ef7f9973ea8ba952a96b7243f2c13</id>
<content type='text'>
The warning message did not printed the LCD pixel clock rate but the LCD
clock divisor input rate. As a consequence, the required and real pixel
clock rates are now passed to the tilcdc_pclk_diff().

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
Reviewed-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-4-dariobin@libero.it
</content>
</entry>
<entry>
<title>drm/tilcdc: fix LCD pixel clock setting</title>
<updated>2021-03-24T10:05:28Z</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-03-22T21:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd1d9e2d4382674f421bab003f9a64cc27b003f4'/>
<id>urn:sha1:fd1d9e2d4382674f421bab003f9a64cc27b003f4</id>
<content type='text'>
The tilcdc_pclk_diff() compares the requested pixel clock rate to the
real one, so passing it clk_rate instead of clk_rate / clkdiv caused
it to fail even if the clk_rate was properly set. Adding the
real_pclk_rate variable makes the code more readable.

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
Reviewed-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-3-dariobin@libero.it
</content>
</entry>
<entry>
<title>drm/tilcdc: rename req_rate to pclk_rate</title>
<updated>2021-03-24T10:05:28Z</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2021-03-22T21:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e17d1364dc3956e39980d12a3d8591bba4076f47'/>
<id>urn:sha1:e17d1364dc3956e39980d12a3d8591bba4076f47</id>
<content type='text'>
The req_rate name is a little misleading, so let's rename to pclk_rate
(pixel clock rate).

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
Reviewed-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Signed-off-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-2-dariobin@libero.it
</content>
</entry>
<entry>
<title>drm/tilcdc: panel: fix platform_no_drv_owner.cocci warnings</title>
<updated>2021-03-24T10:05:28Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-03-03T09:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da588d48004a39cdaaa5f778ffc0debae0548541'/>
<id>urn:sha1:da588d48004a39cdaaa5f778ffc0debae0548541</id>
<content type='text'>
./drivers/gpu/drm/tilcdc/tilcdc_panel.c:402:3-8: No need to set .owner
here. The core will do it.

Remove .owner field if calls are used which set it automatically

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1614762267-98454-1-git-send-email-yang.lee@linux.alibaba.com
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-next-2021-03-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next</title>
<updated>2021-03-16T07:08:46Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2021-03-16T06:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51c3b916a4d7e24b4918925965867fdd9bd8dd59'/>
<id>urn:sha1:51c3b916a4d7e24b4918925965867fdd9bd8dd59</id>
<content type='text'>
drm-misc-next for 5.13:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
  - %p4cc printk format modifier
  - atomic: introduce drm_crtc_commit_wait, rework atomic plane state
    helpers to take the drm_commit_state structure
  - dma-buf: heaps rework to return a struct dma_buf
  - simple-kms: Add plate state helpers
  - ttm: debugfs support, removal of sysfs

Driver Changes:
  - Convert drivers to shadow plane helpers
  - arc: Move to drm/tiny
  - ast: cursor plane reworks
  - gma500: Remove TTM and medfield support
  - mxsfb: imx8mm support
  - panfrost: MMU IRQ handling rework
  - qxl: rework to better handle resources deallocation, locking
  - sun4i: Add alpha properties for UI and VI layers
  - vc4: RPi4 CEC support
  - vmwgfx: doc cleanup

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;

From: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210303100600.dgnkadonzuvfnu22@gilmour
</content>
</entry>
<entry>
<title>drm: Use state helper instead of the plane state pointer</title>
<updated>2021-02-25T07:05:28Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37418bf14c1392260d633e3b4448b78c2f15044a'/>
<id>urn:sha1:37418bf14c1392260d633e3b4448b78c2f15044a</id>
<content type='text'>
Many drivers reference the plane-&gt;state pointer in order to get the
current plane state in their atomic_update or atomic_disable hooks,
which would be the new plane state in the global atomic state since
_swap_state happened when those hooks are run.

Use the drm_atomic_get_new_plane_state helper to get that state to make it
more obvious.

This was made using the coccinelle script below:

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

(
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_disable = func,
	...,
 };
|
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_update = func,
	...,
 };
)

@ adds_new_state @
identifier plane_atomic_func.func;
identifier plane, state;
identifier new_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state)
 {
 	...
-	struct drm_plane_state *new_state = plane-&gt;state;
+	struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane);
	...
 }

@ include depends on adds_new_state @
@@

 #include &lt;drm/drm_atomic.h&gt;

@ no_include depends on !include &amp;&amp; adds_new_state @
@@

+ #include &lt;drm/drm_atomic.h&gt;
  #include &lt;drm/...&gt;

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://lore.kernel.org/r/20210219120032.260676-1-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm/atomic: Pass the full state to planes atomic disable and update</title>
<updated>2021-02-25T07:05:28Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=977697e20b3d758786b67edc33941e5c410ffe4d'/>
<id>urn:sha1:977697e20b3d758786b67edc33941e5c410ffe4d</id>
<content type='text'>
The current atomic helpers have either their object state being passed as
an argument or the full atomic state.

The former is the pattern that was done at first, before switching to the
latter for new hooks or when it was needed.

Let's convert the remaining helpers to provide a consistent interface,
this time with the planes atomic_update and atomic_disable.

The conversion was done using the coccinelle script below, built tested on
all the drivers.

@@
identifier plane, plane_state;
symbol state;
@@

 struct drm_plane_helper_funcs {
 	...
	void (*atomic_update)(struct drm_plane *plane,
-			      struct drm_plane_state *plane_state);
+			      struct drm_atomic_state *state);
 	...
 }

@@
identifier plane, plane_state;
symbol state;
@@

 struct drm_plane_helper_funcs {
	...
	void (*atomic_disable)(struct drm_plane *plane,
-			       struct drm_plane_state *plane_state);
+			       struct drm_atomic_state *state);
	...
 }

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

(
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_update = func,
	...,
 };
|
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_disable = func,
	...,
 };
)

@@
struct drm_plane_helper_funcs *FUNCS;
identifier f;
identifier crtc_state;
identifier plane, plane_state, state;
expression e;
@@

 f(struct drm_crtc_state *crtc_state)
 {
 	...
 	struct drm_atomic_state *state = e;
 	&lt;+...
(
-	FUNCS-&gt;atomic_disable(plane, plane_state)
+	FUNCS-&gt;atomic_disable(plane, state)
|
-	FUNCS-&gt;atomic_update(plane, plane_state)
+	FUNCS-&gt;atomic_update(plane, state)
)
 	...+&gt;
 }

@@
identifier plane_atomic_func.func;
identifier plane;
symbol state;
@@

 func(struct drm_plane *plane,
-    struct drm_plane_state *state)
+    struct drm_plane_state *old_plane_state)
 {
	&lt;...
-	state
+	old_plane_state
	...&gt;
 }

@ ignores_old_state @
identifier plane_atomic_func.func;
identifier plane, old_state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_state)
 {
	... when != old_state
 }

@ adds_old_state depends on plane_atomic_func &amp;&amp; !ignores_old_state @
identifier plane_atomic_func.func;
identifier plane, plane_state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *plane_state)
 {
+	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	...
 }

@ depends on plane_atomic_func @
identifier plane_atomic_func.func;
identifier plane, plane_state;
@@

 func(struct drm_plane *plane,
-     struct drm_plane_state *plane_state
+     struct drm_atomic_state *state
     )
 { ... }

@ include depends on adds_old_state @
@@

 #include &lt;drm/drm_atomic.h&gt;

@ no_include depends on !include &amp;&amp; adds_old_state @
@@

+ #include &lt;drm/drm_atomic.h&gt;
  #include &lt;drm/...&gt;

@@
identifier plane_atomic_func.func;
identifier plane, state;
identifier plane_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state) {
 	...
 	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	&lt;+...
-	plane_state-&gt;state
+	state
 	...+&gt;
 }

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-9-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: Rename plane-&gt;state variables in atomic update and disable</title>
<updated>2021-02-24T19:27:12Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=41016fe1028e4b0ee6f436f928564699898ec2b0'/>
<id>urn:sha1:41016fe1028e4b0ee6f436f928564699898ec2b0</id>
<content type='text'>
Some drivers are storing the plane-&gt;state pointer in atomic_update and
atomic_disable in a variable simply called state, while the state passed
as an argument is called old_state.

In order to ease subsequent reworks and to avoid confusing or
inconsistent names, let's rename those variables to new_state.

This was done using the following coccinelle script, plus some manual
changes for mtk and tegra.

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

(
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_disable = func,
	...,
 };
|
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_update = func,
	...,
 };
)

@ moves_new_state_old_state @
identifier plane_atomic_func.func;
identifier plane;
symbol old_state;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_state)
 {
 	...
-	struct drm_plane_state *state = plane-&gt;state;
+	struct drm_plane_state *new_state = plane-&gt;state;
	...
 }

@ depends on moves_new_state_old_state @
identifier plane_atomic_func.func;
identifier plane;
identifier old_state;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_state)
 {
 	&lt;...
-	state
+	new_state
	...&gt;
 }

@ moves_new_state_oldstate @
identifier plane_atomic_func.func;
identifier plane;
symbol oldstate;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *oldstate)
 {
 	...
-	struct drm_plane_state *state = plane-&gt;state;
+	struct drm_plane_state *newstate = plane-&gt;state;
	...
 }

@ depends on moves_new_state_oldstate @
identifier plane_atomic_func.func;
identifier plane;
identifier old_state;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_state)
 {
 	&lt;...
-	state
+	newstate
	...&gt;
 }

@ moves_new_state_old_pstate @
identifier plane_atomic_func.func;
identifier plane;
symbol old_pstate;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_pstate)
 {
 	...
-	struct drm_plane_state *state = plane-&gt;state;
+	struct drm_plane_state *new_pstate = plane-&gt;state;
	...
 }

@ depends on moves_new_state_old_pstate @
identifier plane_atomic_func.func;
identifier plane;
identifier old_pstate;
symbol state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_pstate)
 {
 	&lt;...
-	state
+	new_pstate
	...&gt;
 }

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-8-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: Use state helper instead of plane state pointer in atomic_check</title>
<updated>2021-02-24T19:27:05Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b6aaf9d76f0420be015b97724ff764844d7c46d'/>
<id>urn:sha1:0b6aaf9d76f0420be015b97724ff764844d7c46d</id>
<content type='text'>
Many drivers reference the plane-&gt;state pointer in order to get the
current plane state in their atomic_check hook, which would be the old
plane state in the global atomic state since _swap_state hasn't happened
when atomic_check is run.

Use the drm_atomic_get_old_plane_state helper to get that state to make
it more obvious.

This was made using the coccinelle script below:

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

static struct drm_plane_helper_funcs helpers = {
	...,
	.atomic_check = func,
	...,
};

@ replaces_old_state @
identifier plane_atomic_func.func;
identifier plane, state, plane_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state) {
 	...
-	struct drm_plane_state *plane_state = plane-&gt;state;
+	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	...
 }

@@
identifier plane_atomic_func.func;
identifier plane, state, plane_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state) {
 	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	&lt;...
-	plane-&gt;state
+	plane_state
 	...&gt;
 }

@ adds_old_state @
identifier plane_atomic_func.func;
identifier plane, state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state) {
+	struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
 	&lt;...
-	plane-&gt;state
+	old_plane_state
 	...&gt;
 }

@ include depends on adds_old_state || replaces_old_state @
@@

 #include &lt;drm/drm_atomic.h&gt;

@ no_include depends on !include &amp;&amp; (adds_old_state || replaces_old_state) @
@@

+ #include &lt;drm/drm_atomic.h&gt;
  #include &lt;drm/...&gt;

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-6-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: Use the state pointer directly in planes atomic_check</title>
<updated>2021-02-24T19:27:03Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dec92020671c48da231189eb06a5f755f492f87f'/>
<id>urn:sha1:dec92020671c48da231189eb06a5f755f492f87f</id>
<content type='text'>
Now that atomic_check takes the global atomic state as a parameter, we
don't need to go through the pointer in the plane state.

This was done using the following coccinelle script:

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

static struct drm_plane_helper_funcs helpers = {
	...,
	.atomic_check = func,
	...,
};

@@
identifier plane_atomic_func.func;
identifier plane, state;
identifier plane_state;
@@

  func(struct drm_plane *plane, struct drm_atomic_state *state) {
  ...
- struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
  &lt;... when != plane_state
- plane_state-&gt;state
+ state
  ...&gt;
 }

@@
identifier plane_atomic_func.func;
identifier plane, state;
identifier plane_state;
@@

  func(struct drm_plane *plane, struct drm_atomic_state *state) {
  ...
  struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
  &lt;...
- plane_state-&gt;state
+ state
  ...&gt;
 }

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-5-maxime@cerno.tech
</content>
</entry>
</feed>
