diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2011-03-19 19:31:52 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-05-15 20:47:17 -0400 |
commit | f212949ced2397b5f00e987bb5d4bb34dc69cc8d (patch) | |
tree | c48bee8ffaff8b8d6ff753b9475da4e1c5727e76 | |
parent | 71298e2f0b6fb6dce9f2b2e999652edf1f643d9e (diff) |
drm/nouveau: Clean up trailing whitespace and C99-style comments.
Fix 'ERROR: trailing whitespace',
Fix 'ERROR: do not use C99 // comments'
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_graph.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_grctx.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_graph.c | 50 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_graph.h | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_grctx.c | 16 |
6 files changed, 40 insertions, 38 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index a30adec5beaa..e04c4b651955 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -861,7 +861,7 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *dev) | |||
861 | #ifdef CONFIG_X86 | 861 | #ifdef CONFIG_X86 |
862 | primary = dev->pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; | 862 | primary = dev->pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; |
863 | #endif | 863 | #endif |
864 | 864 | ||
865 | remove_conflicting_framebuffers(dev_priv->apertures, "nouveaufb", primary); | 865 | remove_conflicting_framebuffers(dev_priv->apertures, "nouveaufb", primary); |
866 | return 0; | 866 | return 0; |
867 | } | 867 | } |
diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c index af75015068d6..c624ae9e9ed3 100644 --- a/drivers/gpu/drm/nouveau/nv04_graph.c +++ b/drivers/gpu/drm/nouveau/nv04_graph.c | |||
@@ -507,7 +507,7 @@ int nv04_graph_init(struct drm_device *dev) | |||
507 | nv_wr32(dev, NV04_PGRAPH_DEBUG_0, 0x001FFFFF);*/ | 507 | nv_wr32(dev, NV04_PGRAPH_DEBUG_0, 0x001FFFFF);*/ |
508 | nv_wr32(dev, NV04_PGRAPH_DEBUG_0, 0x1231c000); | 508 | nv_wr32(dev, NV04_PGRAPH_DEBUG_0, 0x1231c000); |
509 | /*1231C000 blob, 001 haiku*/ | 509 | /*1231C000 blob, 001 haiku*/ |
510 | //*V_WRITE(NV04_PGRAPH_DEBUG_1, 0xf2d91100);*/ | 510 | /*V_WRITE(NV04_PGRAPH_DEBUG_1, 0xf2d91100);*/ |
511 | nv_wr32(dev, NV04_PGRAPH_DEBUG_1, 0x72111100); | 511 | nv_wr32(dev, NV04_PGRAPH_DEBUG_1, 0x72111100); |
512 | /*0x72111100 blob , 01 haiku*/ | 512 | /*0x72111100 blob , 01 haiku*/ |
513 | /*nv_wr32(dev, NV04_PGRAPH_DEBUG_2, 0x11d5f870);*/ | 513 | /*nv_wr32(dev, NV04_PGRAPH_DEBUG_2, 0x11d5f870);*/ |
diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/nv50_grctx.c index a1e98d143785..ac9f1369c488 100644 --- a/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/drivers/gpu/drm/nouveau/nv50_grctx.c | |||
@@ -924,7 +924,7 @@ nv50_graph_construct_mmio_ddata(struct nouveau_grctx *ctx) | |||
924 | dd_emit(ctx, 1, 0); /* 0000007f MULTISAMPLE_SAMPLES_LOG2 */ | 924 | dd_emit(ctx, 1, 0); /* 0000007f MULTISAMPLE_SAMPLES_LOG2 */ |
925 | } else { | 925 | } else { |
926 | dd_emit(ctx, 1, 0); /* 0000000f MULTISAMPLE_SAMPLES_LOG2 */ | 926 | dd_emit(ctx, 1, 0); /* 0000000f MULTISAMPLE_SAMPLES_LOG2 */ |
927 | } | 927 | } |
928 | dd_emit(ctx, 1, 0xc); /* 000000ff SEMANTIC_COLOR.BFC0_ID */ | 928 | dd_emit(ctx, 1, 0xc); /* 000000ff SEMANTIC_COLOR.BFC0_ID */ |
929 | if (dev_priv->chipset != 0x50) | 929 | if (dev_priv->chipset != 0x50) |
930 | dd_emit(ctx, 1, 0); /* 00000001 SEMANTIC_COLOR.CLMP_EN */ | 930 | dd_emit(ctx, 1, 0); /* 00000001 SEMANTIC_COLOR.CLMP_EN */ |
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c b/drivers/gpu/drm/nouveau/nvc0_graph.c index c19ff3042093..68f5c3f70f54 100644 --- a/drivers/gpu/drm/nouveau/nvc0_graph.c +++ b/drivers/gpu/drm/nouveau/nvc0_graph.c | |||
@@ -452,28 +452,30 @@ nvc0_graph_init_gpc_0(struct drm_device *dev) | |||
452 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 452 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
453 | struct nvc0_graph_priv *priv = dev_priv->engine.graph.priv; | 453 | struct nvc0_graph_priv *priv = dev_priv->engine.graph.priv; |
454 | int gpc; | 454 | int gpc; |
455 | 455 | ||
456 | // TP ROP UNKVAL(magic_not_rop_nr) | 456 | /* |
457 | // 450: 4/0/0/0 2 3 | 457 | * TP ROP UNKVAL(magic_not_rop_nr) |
458 | // 460: 3/4/0/0 4 1 | 458 | * 450: 4/0/0/0 2 3 |
459 | // 465: 3/4/4/0 4 7 | 459 | * 460: 3/4/0/0 4 1 |
460 | // 470: 3/3/4/4 5 5 | 460 | * 465: 3/4/4/0 4 7 |
461 | // 480: 3/4/4/4 6 6 | 461 | * 470: 3/3/4/4 5 5 |
462 | 462 | * 480: 3/4/4/4 6 6 | |
463 | // magicgpc918 | 463 | |
464 | // 450: 00200000 00000000001000000000000000000000 | 464 | * magicgpc918 |
465 | // 460: 00124925 00000000000100100100100100100101 | 465 | * 450: 00200000 00000000001000000000000000000000 |
466 | // 465: 000ba2e9 00000000000010111010001011101001 | 466 | * 460: 00124925 00000000000100100100100100100101 |
467 | // 470: 00092493 00000000000010010010010010010011 | 467 | * 465: 000ba2e9 00000000000010111010001011101001 |
468 | // 480: 00088889 00000000000010001000100010001001 | 468 | * 470: 00092493 00000000000010010010010010010011 |
469 | 469 | * 480: 00088889 00000000000010001000100010001001 | |
470 | /* filled values up to tp_total, remainder 0 */ | 470 | |
471 | // 450: 00003210 00000000 00000000 00000000 | 471 | * filled values up to tp_total, remainder 0 |
472 | // 460: 02321100 00000000 00000000 00000000 | 472 | * 450: 00003210 00000000 00000000 00000000 |
473 | // 465: 22111000 00000233 00000000 00000000 | 473 | * 460: 02321100 00000000 00000000 00000000 |
474 | // 470: 11110000 00233222 00000000 00000000 | 474 | * 465: 22111000 00000233 00000000 00000000 |
475 | // 480: 11110000 03332222 00000000 00000000 | 475 | * 470: 11110000 00233222 00000000 00000000 |
476 | 476 | * 480: 11110000 03332222 00000000 00000000 | |
477 | */ | ||
478 | |||
477 | nv_wr32(dev, GPC_BCAST(0x0980), priv->magicgpc980[0]); | 479 | nv_wr32(dev, GPC_BCAST(0x0980), priv->magicgpc980[0]); |
478 | nv_wr32(dev, GPC_BCAST(0x0984), priv->magicgpc980[1]); | 480 | nv_wr32(dev, GPC_BCAST(0x0984), priv->magicgpc980[1]); |
479 | nv_wr32(dev, GPC_BCAST(0x0988), priv->magicgpc980[2]); | 481 | nv_wr32(dev, GPC_BCAST(0x0988), priv->magicgpc980[2]); |
@@ -676,9 +678,9 @@ nvc0_graph_init(struct drm_device *dev) | |||
676 | 678 | ||
677 | nvc0_graph_init_obj418880(dev); | 679 | nvc0_graph_init_obj418880(dev); |
678 | nvc0_graph_init_regs(dev); | 680 | nvc0_graph_init_regs(dev); |
679 | //nvc0_graph_init_unitplemented_magics(dev); | 681 | /*nvc0_graph_init_unitplemented_magics(dev);*/ |
680 | nvc0_graph_init_gpc_0(dev); | 682 | nvc0_graph_init_gpc_0(dev); |
681 | //nvc0_graph_init_unitplemented_c242(dev); | 683 | /*nvc0_graph_init_unitplemented_c242(dev);*/ |
682 | 684 | ||
683 | nv_wr32(dev, 0x400500, 0x00010001); | 685 | nv_wr32(dev, 0x400500, 0x00010001); |
684 | nv_wr32(dev, 0x400100, 0xffffffff); | 686 | nv_wr32(dev, 0x400100, 0xffffffff); |
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.h b/drivers/gpu/drm/nouveau/nvc0_graph.h index 40e26f9c56c4..93c8777a8dcd 100644 --- a/drivers/gpu/drm/nouveau/nvc0_graph.h +++ b/drivers/gpu/drm/nouveau/nvc0_graph.h | |||
@@ -52,9 +52,9 @@ struct nvc0_graph_priv { | |||
52 | 52 | ||
53 | struct nvc0_graph_chan { | 53 | struct nvc0_graph_chan { |
54 | struct nouveau_gpuobj *grctx; | 54 | struct nouveau_gpuobj *grctx; |
55 | struct nouveau_gpuobj *unk408004; // 0x418810 too | 55 | struct nouveau_gpuobj *unk408004; /* 0x418810 too */ |
56 | struct nouveau_gpuobj *unk40800c; // 0x419004 too | 56 | struct nouveau_gpuobj *unk40800c; /* 0x419004 too */ |
57 | struct nouveau_gpuobj *unk418810; // 0x419848 too | 57 | struct nouveau_gpuobj *unk418810; /* 0x419848 too */ |
58 | struct nouveau_gpuobj *mmio; | 58 | struct nouveau_gpuobj *mmio; |
59 | int mmio_nr; | 59 | int mmio_nr; |
60 | }; | 60 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvc0_grctx.c b/drivers/gpu/drm/nouveau/nvc0_grctx.c index f880ff776db8..6cede9f05c88 100644 --- a/drivers/gpu/drm/nouveau/nvc0_grctx.c +++ b/drivers/gpu/drm/nouveau/nvc0_grctx.c | |||
@@ -1623,7 +1623,7 @@ nvc0_grctx_generate_rop(struct drm_device *dev) | |||
1623 | { | 1623 | { |
1624 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 1624 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
1625 | 1625 | ||
1626 | // ROPC_BROADCAST | 1626 | /* ROPC_BROADCAST */ |
1627 | nv_wr32(dev, 0x408800, 0x02802a3c); | 1627 | nv_wr32(dev, 0x408800, 0x02802a3c); |
1628 | nv_wr32(dev, 0x408804, 0x00000040); | 1628 | nv_wr32(dev, 0x408804, 0x00000040); |
1629 | nv_wr32(dev, 0x408808, 0x0003e00d); | 1629 | nv_wr32(dev, 0x408808, 0x0003e00d); |
@@ -1647,7 +1647,7 @@ nvc0_grctx_generate_gpc(struct drm_device *dev) | |||
1647 | { | 1647 | { |
1648 | int i; | 1648 | int i; |
1649 | 1649 | ||
1650 | // GPC_BROADCAST | 1650 | /* GPC_BROADCAST */ |
1651 | nv_wr32(dev, 0x418380, 0x00000016); | 1651 | nv_wr32(dev, 0x418380, 0x00000016); |
1652 | nv_wr32(dev, 0x418400, 0x38004e00); | 1652 | nv_wr32(dev, 0x418400, 0x38004e00); |
1653 | nv_wr32(dev, 0x418404, 0x71e0ffff); | 1653 | nv_wr32(dev, 0x418404, 0x71e0ffff); |
@@ -1728,7 +1728,7 @@ nvc0_grctx_generate_tp(struct drm_device *dev) | |||
1728 | { | 1728 | { |
1729 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 1729 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
1730 | 1730 | ||
1731 | // GPC_BROADCAST.TP_BROADCAST | 1731 | /* GPC_BROADCAST.TP_BROADCAST */ |
1732 | nv_wr32(dev, 0x419848, 0x00000000); | 1732 | nv_wr32(dev, 0x419848, 0x00000000); |
1733 | nv_wr32(dev, 0x419864, 0x0000012a); | 1733 | nv_wr32(dev, 0x419864, 0x0000012a); |
1734 | nv_wr32(dev, 0x419888, 0x00000000); | 1734 | nv_wr32(dev, 0x419888, 0x00000000); |
@@ -1741,7 +1741,7 @@ nvc0_grctx_generate_tp(struct drm_device *dev) | |||
1741 | nv_wr32(dev, 0x419a1c, 0x00000000); | 1741 | nv_wr32(dev, 0x419a1c, 0x00000000); |
1742 | nv_wr32(dev, 0x419a20, 0x00000800); | 1742 | nv_wr32(dev, 0x419a20, 0x00000800); |
1743 | if (dev_priv->chipset != 0xc0) | 1743 | if (dev_priv->chipset != 0xc0) |
1744 | nv_wr32(dev, 0x00419ac4, 0x0007f440); // 0xc3 | 1744 | nv_wr32(dev, 0x00419ac4, 0x0007f440); /* 0xc3 */ |
1745 | nv_wr32(dev, 0x419b00, 0x0a418820); | 1745 | nv_wr32(dev, 0x419b00, 0x0a418820); |
1746 | nv_wr32(dev, 0x419b04, 0x062080e6); | 1746 | nv_wr32(dev, 0x419b04, 0x062080e6); |
1747 | nv_wr32(dev, 0x419b08, 0x020398a4); | 1747 | nv_wr32(dev, 0x419b08, 0x020398a4); |
@@ -1912,13 +1912,13 @@ nvc0_grctx_generate(struct nouveau_channel *chan) | |||
1912 | for (i = 1; i < 7; i++) | 1912 | for (i = 1; i < 7; i++) |
1913 | data2[1] |= ((1 << (i + 5)) % ntpcv) << ((i - 1) * 5); | 1913 | data2[1] |= ((1 << (i + 5)) % ntpcv) << ((i - 1) * 5); |
1914 | 1914 | ||
1915 | // GPC_BROADCAST | 1915 | /* GPC_BROADCAST */ |
1916 | nv_wr32(dev, 0x418bb8, (priv->tp_total << 8) | | 1916 | nv_wr32(dev, 0x418bb8, (priv->tp_total << 8) | |
1917 | priv->magic_not_rop_nr); | 1917 | priv->magic_not_rop_nr); |
1918 | for (i = 0; i < 6; i++) | 1918 | for (i = 0; i < 6; i++) |
1919 | nv_wr32(dev, 0x418b08 + (i * 4), data[i]); | 1919 | nv_wr32(dev, 0x418b08 + (i * 4), data[i]); |
1920 | 1920 | ||
1921 | // GPC_BROADCAST.TP_BROADCAST | 1921 | /* GPC_BROADCAST.TP_BROADCAST */ |
1922 | nv_wr32(dev, 0x419bd0, (priv->tp_total << 8) | | 1922 | nv_wr32(dev, 0x419bd0, (priv->tp_total << 8) | |
1923 | priv->magic_not_rop_nr | | 1923 | priv->magic_not_rop_nr | |
1924 | data2[0]); | 1924 | data2[0]); |
@@ -1926,7 +1926,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan) | |||
1926 | for (i = 0; i < 6; i++) | 1926 | for (i = 0; i < 6; i++) |
1927 | nv_wr32(dev, 0x419b00 + (i * 4), data[i]); | 1927 | nv_wr32(dev, 0x419b00 + (i * 4), data[i]); |
1928 | 1928 | ||
1929 | // UNK78xx | 1929 | /* UNK78xx */ |
1930 | nv_wr32(dev, 0x4078bc, (priv->tp_total << 8) | | 1930 | nv_wr32(dev, 0x4078bc, (priv->tp_total << 8) | |
1931 | priv->magic_not_rop_nr); | 1931 | priv->magic_not_rop_nr); |
1932 | for (i = 0; i < 6; i++) | 1932 | for (i = 0; i < 6; i++) |
@@ -1944,7 +1944,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan) | |||
1944 | gpc = -1; | 1944 | gpc = -1; |
1945 | for (i = 0, gpc = -1; i < 32; i++) { | 1945 | for (i = 0, gpc = -1; i < 32; i++) { |
1946 | int ltp = i * (priv->tp_total - 1) / 32; | 1946 | int ltp = i * (priv->tp_total - 1) / 32; |
1947 | 1947 | ||
1948 | do { | 1948 | do { |
1949 | gpc = (gpc + 1) % priv->gpc_nr; | 1949 | gpc = (gpc + 1) % priv->gpc_nr; |
1950 | } while (!tpnr[gpc]); | 1950 | } while (!tpnr[gpc]); |