* [Nouveau] [PATCH] drm/nouveau: cleanup-coding-style-a-bit
@ 2021-03-31 13:12 Bernard Zhao
0 siblings, 0 replies; only message in thread
From: Bernard Zhao @ 2021-03-31 13:12 UTC (permalink / raw)
To: Ben Skeggs, David Airlie, Daniel Vetter, Lyude Paul,
Christian König, dri-devel, nouveau, linux-kernel
Cc: opensource.kernel, Bernard Zhao
This change is to make the code a bit readable.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 44 ++++++++++-----------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
index 57df997c5ff3..053e86845d63 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
@@ -41,9 +41,9 @@ static int
wndwc37e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 13);
- if ((ret = PUSH_WAIT(push, 13)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CSC_RED2RED, asyw->csc.matrix, 12);
@@ -54,9 +54,9 @@ static int
wndwc37e_ilut_clr(struct nv50_wndw *wndw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 2);
- if ((ret = PUSH_WAIT(push, 2)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_INPUT_LUT, 0x00000000);
@@ -67,9 +67,9 @@ static int
wndwc37e_ilut_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 4);
- if ((ret = PUSH_WAIT(push, 4)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CONTROL_INPUT_LUT,
@@ -100,9 +100,9 @@ int
wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 8);
- if ((ret = PUSH_WAIT(push, 8)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_COMPOSITION_CONTROL,
@@ -145,9 +145,9 @@ int
wndwc37e_image_clr(struct nv50_wndw *wndw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 4);
- if ((ret = PUSH_WAIT(push, 4)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_PRESENT_CONTROL,
@@ -162,9 +162,9 @@ static int
wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 17);
- if ((ret = PUSH_WAIT(push, 17)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_PRESENT_CONTROL,
@@ -215,9 +215,9 @@ int
wndwc37e_ntfy_clr(struct nv50_wndw *wndw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 2);
- if ((ret = PUSH_WAIT(push, 2)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_NOTIFIER, 0x00000000);
@@ -228,9 +228,9 @@ int
wndwc37e_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 3);
- if ((ret = PUSH_WAIT(push, 3)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_NOTIFIER, asyw->ntfy.handle,
@@ -245,9 +245,9 @@ int
wndwc37e_sema_clr(struct nv50_wndw *wndw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 2);
- if ((ret = PUSH_WAIT(push, 2)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_CONTEXT_DMA_SEMAPHORE, 0x00000000);
@@ -258,9 +258,9 @@ int
wndwc37e_sema_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 5);
- if ((ret = PUSH_WAIT(push, 5)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_SEMAPHORE_CONTROL, asyw->sema.offset,
@@ -274,9 +274,9 @@ int
wndwc37e_update(struct nv50_wndw *wndw, u32 *interlock)
{
struct nvif_push *push = wndw->wndw.push;
- int ret;
+ int ret = PUSH_WAIT(push, 5);
- if ((ret = PUSH_WAIT(push, 5)))
+ if (ret)
return ret;
PUSH_MTHD(push, NVC37E, SET_INTERLOCK_FLAGS, interlock[NV50_DISP_INTERLOCK_CURS] << 1 |
--
2.31.0
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-31 19:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 13:12 [Nouveau] [PATCH] drm/nouveau: cleanup-coding-style-a-bit Bernard Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).