All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static
@ 2016-09-15 13:28 Jani Nikula
  2016-09-15 13:28 ` [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Fix sparse warning:

drivers/gpu/drm/i915/intel_dp.c:1527:5: warning: symbol
'intel_dp_compute_bpp' was not declared. Should it be static?

Fixes: f9bb705e65f6 ("drm/i915: Update bits per component for display info")
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 69cee9b0a08d..acd0c51f74d5 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1524,8 +1524,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,
 	}
 }
 
-int intel_dp_compute_bpp(struct intel_dp *intel_dp,
-			 struct intel_crtc_state *pipe_config)
+static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
+				struct intel_crtc_state *pipe_config)
 {
 	int bpp, bpc;
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
@ 2016-09-15 13:28 ` Jani Nikula
  2016-09-15 17:13   ` Pandiyan, Dhinakaran
  2016-09-15 13:28 ` [PATCH 3/6] drm/i915: keep declarations in i915_drv.h Jani Nikula
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Rodrigo Vivi, Ander Conselvan de Oliveira

Fixes sparse warning:

drivers/gpu/drm/i915/intel_dpll_mgr.c:1712:24: warning: Using plain
integer as NULL pointer

Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()")
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c
index 4b067accd5cd..c26d18a574b6 100644
--- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
@@ -1709,12 +1709,12 @@ bxt_get_dpll(struct intel_crtc *crtc,
 	if (encoder->type == INTEL_OUTPUT_HDMI
 	    && !bxt_ddi_hdmi_pll_dividers(crtc, crtc_state,
 					  clock, &clk_div))
-		return false;
+		return NULL;
 
 	if ((encoder->type == INTEL_OUTPUT_DP ||
 	     encoder->type == INTEL_OUTPUT_EDP) &&
 	    !bxt_ddi_dp_set_dpll_hw_state(clock, &dpll_hw_state))
-		return false;
+		return NULL;
 
 	memset(&crtc_state->dpll_hw_state, 0,
 	       sizeof(crtc_state->dpll_hw_state));
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
  2016-09-15 13:28 ` [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer Jani Nikula
@ 2016-09-15 13:28 ` Jani Nikula
  2016-09-19 16:14   ` Joonas Lahtinen
  2016-09-15 13:28 ` [PATCH 4/6] drm/i915: use NULL for NULL pointers Jani Nikula
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Fix sparse warnings:

drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
'i915_driver_load' was not declared. Should it be static?

drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
'i915_driver_unload' was not declared. Should it be static?

drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
was not declared. Should it be static?

Fixes: 42f5551d2769 ("drm/i915: Split out the PCI driver interface to i915_pci.c")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 5 +++++
 drivers/gpu/drm/i915/i915_pci.c | 7 -------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a4bf10407cba..c0a7ea4dc2a9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2885,6 +2885,11 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
 extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
 			      unsigned long arg);
 #endif
+extern const struct dev_pm_ops i915_pm_ops;
+
+extern int i915_driver_load(struct pci_dev *pdev,
+			    const struct pci_device_id *ent);
+extern void i915_driver_unload(struct drm_device *dev);
 extern int intel_gpu_reset(struct drm_i915_private *dev_priv, u32 engine_mask);
 extern bool intel_has_gpu_reset(struct drm_i915_private *dev_priv);
 extern void i915_reset(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 687c768833b3..31e6edd08dd0 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -431,9 +431,6 @@ static const struct pci_device_id pciidlist[] = {
 };
 MODULE_DEVICE_TABLE(pci, pciidlist);
 
-extern int i915_driver_load(struct pci_dev *pdev,
-			    const struct pci_device_id *ent);
-
 static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct intel_device_info *intel_info =
@@ -463,8 +460,6 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return i915_driver_load(pdev, ent);
 }
 
-extern void i915_driver_unload(struct drm_device *dev);
-
 static void i915_pci_remove(struct pci_dev *pdev)
 {
 	struct drm_device *dev = pci_get_drvdata(pdev);
@@ -473,8 +468,6 @@ static void i915_pci_remove(struct pci_dev *pdev)
 	drm_dev_unref(dev);
 }
 
-extern const struct dev_pm_ops i915_pm_ops;
-
 static struct pci_driver i915_pci_driver = {
 	.name = DRIVER_NAME,
 	.id_table = pciidlist,
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/6] drm/i915: use NULL for NULL pointers
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
  2016-09-15 13:28 ` [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer Jani Nikula
  2016-09-15 13:28 ` [PATCH 3/6] drm/i915: keep declarations in i915_drv.h Jani Nikula
@ 2016-09-15 13:28 ` Jani Nikula
  2016-09-15 17:09   ` Pandiyan, Dhinakaran
  2016-09-15 13:28 ` [PATCH 5/6] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Fix sparse warning:

drivers/gpu/drm/i915/i915_cmd_parser.c:987:72: warning: Using plain
integer as NULL pointer

Fixes: 52a42cec4b70 ("drm/i915/cmdparser: Accelerate copies from WC memory")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 3c72b3b103e7..70980f82a15b 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -984,7 +984,7 @@ static u32 *copy_batch(struct drm_i915_gem_object *dst_obj,
 
 	src = ERR_PTR(-ENODEV);
 	if (src_needs_clflush &&
-	    i915_memcpy_from_wc((void *)(uintptr_t)batch_start_offset, 0, 0)) {
+	    i915_memcpy_from_wc((void *)(uintptr_t)batch_start_offset, NULL, 0)) {
 		src = i915_gem_object_pin_map(src_obj, I915_MAP_WC);
 		if (!IS_ERR(src)) {
 			i915_memcpy_from_wc(dst,
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/6] drm/i915: workaround sparse warning on variable length arrays
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
                   ` (2 preceding siblings ...)
  2016-09-15 13:28 ` [PATCH 4/6] drm/i915: use NULL for NULL pointers Jani Nikula
@ 2016-09-15 13:28 ` Jani Nikula
  2016-09-15 13:28 ` [PATCH 6/6] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Fix sparse warning:

drivers/gpu/drm/i915/intel_device_info.c:195:31: warning: Variable
length array is used.

In truth the array does have constant length, but sparse is too dumb to
realize. This is a bit ugly, but silence the warning no matter what.

Fixes: 91bedd34abf0 ("drm/i915/bdw: Check for slice, subslice and EU count for BDW")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 73b6858600ac..1b20e160bc1f 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -192,7 +192,7 @@ static void broadwell_sseu_info_init(struct drm_i915_private *dev_priv)
 	struct sseu_dev_info *sseu = &mkwrite_device_info(dev_priv)->sseu;
 	const int s_max = 3, ss_max = 3, eu_max = 8;
 	int s, ss;
-	u32 fuse2, eu_disable[s_max];
+	u32 fuse2, eu_disable[3]; /* s_max */
 
 	fuse2 = I915_READ(GEN8_FUSE2);
 	sseu->slice_mask = (fuse2 & GEN8_F2_S_ENA_MASK) >> GEN8_F2_S_ENA_SHIFT;
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 6/6] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
                   ` (3 preceding siblings ...)
  2016-09-15 13:28 ` [PATCH 5/6] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
@ 2016-09-15 13:28 ` Jani Nikula
  2016-09-15 13:49 ` ✗ Fi.CI.BAT: warning for series starting with [1/6] drm/i915: make intel_dp_compute_bpp static Patchwork
  2016-09-15 14:35 ` [PATCH 1/6] " Jim Bride
  6 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2016-09-15 13:28 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52: warning: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52:    expected void [noderef] <asn:2>*vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:432:52:    got void *
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15: warning: incorrect type in assignment (different address spaces)
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15:    expected void *vaddr
drivers/gpu/drm/i915/i915_gem_execbuffer.c:477:15:    got void [noderef] <asn:2>*

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 33c85227643d..e88786ea1219 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -429,7 +429,7 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
 	}
 
 	if (cache->vaddr) {
-		io_mapping_unmap_atomic(unmask_page(cache->vaddr));
+		io_mapping_unmap_atomic((void __force __iomem *) unmask_page(cache->vaddr));
 	} else {
 		struct i915_vma *vma;
 		int ret;
@@ -474,7 +474,7 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
 		offset += page << PAGE_SHIFT;
 	}
 
-	vaddr = io_mapping_map_atomic_wc(&cache->i915->ggtt.mappable, offset);
+	vaddr = (void __force *) io_mapping_map_atomic_wc(&cache->i915->ggtt.mappable, offset);
 	cache->page = page;
 	cache->vaddr = (unsigned long)vaddr;
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* ✗ Fi.CI.BAT: warning for series starting with [1/6] drm/i915: make intel_dp_compute_bpp static
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
                   ` (4 preceding siblings ...)
  2016-09-15 13:28 ` [PATCH 6/6] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
@ 2016-09-15 13:49 ` Patchwork
  2016-09-15 14:35 ` [PATCH 1/6] " Jim Bride
  6 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2016-09-15 13:49 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/6] drm/i915: make intel_dp_compute_bpp static
URL   : https://patchwork.freedesktop.org/series/12503/
State : warning

== Summary ==

Series 12503v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/12503/revisions/1/mbox/

Test drv_module_reload_basic:
                pass       -> SKIP       (fi-skl-6700hq)
                skip       -> PASS       (fi-hsw-4770r)
Test kms_cursor_legacy:
        Subgroup basic-flip-before-cursor-legacy:
                pass       -> DMESG-WARN (fi-byt-n2820)
Test kms_pipe_crc_basic:
        Subgroup hang-read-crc-pipe-b:
                pass       -> SKIP       (fi-ivb-3770)

fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:202  dwarn:0   dfail:0   fail:0   skip:42 
fi-byt-j1900     total:244  pass:211  dwarn:1   dfail:0   fail:1   skip:31 
fi-byt-n2820     total:244  pass:207  dwarn:1   dfail:0   fail:1   skip:35 
fi-hsw-4770k     total:244  pass:226  dwarn:0   dfail:0   fail:0   skip:18 
fi-hsw-4770r     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ilk-650       total:244  pass:183  dwarn:0   dfail:0   fail:1   skip:60 
fi-ivb-3520m     total:244  pass:219  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:244  pass:206  dwarn:0   dfail:0   fail:0   skip:38 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:220  dwarn:0   dfail:0   fail:1   skip:23 
fi-skl-6700k     total:244  pass:219  dwarn:1   dfail:0   fail:0   skip:24 
fi-skl-6770hq    total:244  pass:228  dwarn:1   dfail:0   fail:1   skip:14 
fi-snb-2520m     total:244  pass:208  dwarn:0   dfail:0   fail:0   skip:36 
fi-snb-2600      total:244  pass:207  dwarn:0   dfail:0   fail:0   skip:37 

Results at /archive/results/CI_IGT_test/Patchwork_2540/

0ab36c7521bda5633d4d963a505014042b305346 drm-intel-nightly: 2016y-09m-15d-11h-56m-55s UTC integration manifest
9da4ceb drm/i915: silence io mapping/unmapping sparse warnings on different address spaces
8875086 drm/i915: workaround sparse warning on variable length arrays
6dc2628e drm/i915: use NULL for NULL pointers
bf97cc2 drm/i915: keep declarations in i915_drv.h
46dd452 drm/i915: do not use 'false' as a NULL pointer
5bc5b51 drm/i915: make intel_dp_compute_bpp static

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static
  2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
                   ` (5 preceding siblings ...)
  2016-09-15 13:49 ` ✗ Fi.CI.BAT: warning for series starting with [1/6] drm/i915: make intel_dp_compute_bpp static Patchwork
@ 2016-09-15 14:35 ` Jim Bride
  2016-09-16  7:45   ` Jani Nikula
  6 siblings, 1 reply; 18+ messages in thread
From: Jim Bride @ 2016-09-15 14:35 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Thu, Sep 15, 2016 at 04:28:52PM +0300, Jani Nikula wrote:
> Fix sparse warning:
> 
> drivers/gpu/drm/i915/intel_dp.c:1527:5: warning: symbol
> 'intel_dp_compute_bpp' was not declared. Should it be static?
> 
> Fixes: f9bb705e65f6 ("drm/i915: Update bits per component for display info")
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Jim Bride <jim.bride@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 69cee9b0a08d..acd0c51f74d5 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1524,8 +1524,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,
>  	}
>  }
>  
> -int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> -			 struct intel_crtc_state *pipe_config)
> +static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
> +				struct intel_crtc_state *pipe_config)
>  {
>  	int bpp, bpc;
>  
> -- 
> 2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/6] drm/i915: use NULL for NULL pointers
  2016-09-15 13:28 ` [PATCH 4/6] drm/i915: use NULL for NULL pointers Jani Nikula
@ 2016-09-15 17:09   ` Pandiyan, Dhinakaran
  0 siblings, 0 replies; 18+ messages in thread
From: Pandiyan, Dhinakaran @ 2016-09-15 17:09 UTC (permalink / raw)
  To: Nikula, Jani; +Cc: intel-gfx

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

On Thu, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
> Fix sparse warning:
> 
> drivers/gpu/drm/i915/i915_cmd_parser.c:987:72: warning: Using plain
> integer as NULL pointer
> 
> Fixes: 52a42cec4b70 ("drm/i915/cmdparser: Accelerate copies from WC memory")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index 3c72b3b103e7..70980f82a15b 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -984,7 +984,7 @@ static u32 *copy_batch(struct drm_i915_gem_object *dst_obj,
>  
>  	src = ERR_PTR(-ENODEV);
>  	if (src_needs_clflush &&
> -	    i915_memcpy_from_wc((void *)(uintptr_t)batch_start_offset, 0, 0)) {
> +	    i915_memcpy_from_wc((void *)(uintptr_t)batch_start_offset, NULL, 0)) {
>  		src = i915_gem_object_pin_map(src_obj, I915_MAP_WC);
>  		if (!IS_ERR(src)) {
>  			i915_memcpy_from_wc(dst,

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer
  2016-09-15 13:28 ` [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer Jani Nikula
@ 2016-09-15 17:13   ` Pandiyan, Dhinakaran
  0 siblings, 0 replies; 18+ messages in thread
From: Pandiyan, Dhinakaran @ 2016-09-15 17:13 UTC (permalink / raw)
  To: Nikula, Jani; +Cc: Conselvan De Oliveira, Ander, intel-gfx, Vivi, Rodrigo

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

On Thu, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
> Fixes sparse warning:
> 
> drivers/gpu/drm/i915/intel_dpll_mgr.c:1712:24: warning: Using plain
> integer as NULL pointer
> 
> Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()")
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> Cc: Durgadoss R <durgadoss.r@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c
> index 4b067accd5cd..c26d18a574b6 100644
> --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
> @@ -1709,12 +1709,12 @@ bxt_get_dpll(struct intel_crtc *crtc,
>  	if (encoder->type == INTEL_OUTPUT_HDMI
>  	    && !bxt_ddi_hdmi_pll_dividers(crtc, crtc_state,
>  					  clock, &clk_div))
> -		return false;
> +		return NULL;
>  
>  	if ((encoder->type == INTEL_OUTPUT_DP ||
>  	     encoder->type == INTEL_OUTPUT_EDP) &&
>  	    !bxt_ddi_dp_set_dpll_hw_state(clock, &dpll_hw_state))
> -		return false;
> +		return NULL;
>  
>  	memset(&crtc_state->dpll_hw_state, 0,
>  	       sizeof(crtc_state->dpll_hw_state));

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static
  2016-09-15 14:35 ` [PATCH 1/6] " Jim Bride
@ 2016-09-16  7:45   ` Jani Nikula
  0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2016-09-16  7:45 UTC (permalink / raw)
  To: Jim Bride; +Cc: intel-gfx

On Thu, 15 Sep 2016, Jim Bride <jim.bride@linux.intel.com> wrote:
> On Thu, Sep 15, 2016 at 04:28:52PM +0300, Jani Nikula wrote:
>> Fix sparse warning:
>> 
>> drivers/gpu/drm/i915/intel_dp.c:1527:5: warning: symbol
>> 'intel_dp_compute_bpp' was not declared. Should it be static?
>> 
>> Fixes: f9bb705e65f6 ("drm/i915: Update bits per component for display info")
>> Cc: Mika Kahola <mika.kahola@intel.com>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Jim Bride <jim.bride@linux.intel.com>

Thanks, pushed patches 1, 2 and 4. Waiting review on the others.

BR,
Jani.


>
>> ---
>>  drivers/gpu/drm/i915/intel_dp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index 69cee9b0a08d..acd0c51f74d5 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -1524,8 +1524,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,
>>  	}
>>  }
>>  
>> -int intel_dp_compute_bpp(struct intel_dp *intel_dp,
>> -			 struct intel_crtc_state *pipe_config)
>> +static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
>> +				struct intel_crtc_state *pipe_config)
>>  {
>>  	int bpp, bpc;
>>  
>> -- 
>> 2.1.4

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-15 13:28 ` [PATCH 3/6] drm/i915: keep declarations in i915_drv.h Jani Nikula
@ 2016-09-19 16:14   ` Joonas Lahtinen
  2016-09-20  8:57     ` Jani Nikula
  0 siblings, 1 reply; 18+ messages in thread
From: Joonas Lahtinen @ 2016-09-19 16:14 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
> Fix sparse warnings:
> 
> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
> 'i915_driver_load' was not declared. Should it be static?
> 
> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
> 'i915_driver_unload' was not declared. Should it be static?
> 
> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
> was not declared. Should it be static?
> 

Hmm, Chris, were not these change in the middle of a series, did the
cleanup patches just fall off?

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-19 16:14   ` Joonas Lahtinen
@ 2016-09-20  8:57     ` Jani Nikula
  2016-09-20  9:29       ` Chris Wilson
  0 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2016-09-20  8:57 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx

On Mon, 19 Sep 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
>> Fix sparse warnings:
>> 
>> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
>> 'i915_driver_load' was not declared. Should it be static?
>> 
>> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
>> 'i915_driver_unload' was not declared. Should it be static?
>> 
>> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
>> was not declared. Should it be static?
>> 
>
> Hmm, Chris, were not these change in the middle of a series, did the
> cleanup patches just fall off?

Can we just please use whichever patches that fix the issue?

BR,
Jani.



>
> Regards, Joonas

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-20  8:57     ` Jani Nikula
@ 2016-09-20  9:29       ` Chris Wilson
  2016-09-20  9:58         ` Jani Nikula
  0 siblings, 1 reply; 18+ messages in thread
From: Chris Wilson @ 2016-09-20  9:29 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Tue, Sep 20, 2016 at 11:57:06AM +0300, Jani Nikula wrote:
> On Mon, 19 Sep 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> > On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
> >> Fix sparse warnings:
> >> 
> >> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
> >> 'i915_driver_load' was not declared. Should it be static?
> >> 
> >> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
> >> 'i915_driver_unload' was not declared. Should it be static?
> >> 
> >> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
> >> was not declared. Should it be static?
> >> 
> >
> > Hmm, Chris, were not these change in the middle of a series, did the
> > cleanup patches just fall off?
> 
> Can we just please use whichever patches that fix the issue?

It was deliberate placement to avoid having those symbols exposed to
every user of i915_drv.h, i.e. everyone. Limit i915_drv.h to the
interface exposed by i915_drv.c and so used only by a handful of files.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-20  9:29       ` Chris Wilson
@ 2016-09-20  9:58         ` Jani Nikula
  2016-09-22 11:50           ` Daniel Vetter
  0 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2016-09-20  9:58 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, 20 Sep 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, Sep 20, 2016 at 11:57:06AM +0300, Jani Nikula wrote:
>> On Mon, 19 Sep 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
>> > On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
>> >> Fix sparse warnings:
>> >> 
>> >> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
>> >> 'i915_driver_load' was not declared. Should it be static?
>> >> 
>> >> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
>> >> 'i915_driver_unload' was not declared. Should it be static?
>> >> 
>> >> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
>> >> was not declared. Should it be static?
>> >> 
>> >
>> > Hmm, Chris, were not these change in the middle of a series, did the
>> > cleanup patches just fall off?
>> 
>> Can we just please use whichever patches that fix the issue?
>
> It was deliberate placement to avoid having those symbols exposed to
> every user of i915_drv.h, i.e. everyone. Limit i915_drv.h to the
> interface exposed by i915_drv.c and so used only by a handful of files.

I can see that, but I prefer to get the warnings gone.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-20  9:58         ` Jani Nikula
@ 2016-09-22 11:50           ` Daniel Vetter
  2016-09-22 12:11             ` Jani Nikula
  2016-09-26  6:32             ` Joonas Lahtinen
  0 siblings, 2 replies; 18+ messages in thread
From: Daniel Vetter @ 2016-09-22 11:50 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Tue, Sep 20, 2016 at 12:58:20PM +0300, Jani Nikula wrote:
> On Tue, 20 Sep 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Tue, Sep 20, 2016 at 11:57:06AM +0300, Jani Nikula wrote:
> >> On Mon, 19 Sep 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> >> > On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
> >> >> Fix sparse warnings:
> >> >> 
> >> >> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
> >> >> 'i915_driver_load' was not declared. Should it be static?
> >> >> 
> >> >> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
> >> >> 'i915_driver_unload' was not declared. Should it be static?
> >> >> 
> >> >> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
> >> >> was not declared. Should it be static?
> >> >> 
> >> >
> >> > Hmm, Chris, were not these change in the middle of a series, did the
> >> > cleanup patches just fall off?
> >> 
> >> Can we just please use whichever patches that fix the issue?
> >
> > It was deliberate placement to avoid having those symbols exposed to
> > every user of i915_drv.h, i.e. everyone. Limit i915_drv.h to the
> > interface exposed by i915_drv.c and so used only by a handful of files.
> 
> I can see that, but I prefer to get the warnings gone.

Yeah, non-static declarations need to be in header files, otherwise
there's not much point in them really (since the compiler can't compare
the delcaration with the definition).

we also need to split up our headers I think, and I plan to start doing
that when extracting bits and pieces from intel_display.c. In drm core at
least having 1:1 between headers and source files seems to work rather
well.

Meanwhile on Jani's patch:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-22 11:50           ` Daniel Vetter
@ 2016-09-22 12:11             ` Jani Nikula
  2016-09-26  6:32             ` Joonas Lahtinen
  1 sibling, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2016-09-22 12:11 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Thu, 22 Sep 2016, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Sep 20, 2016 at 12:58:20PM +0300, Jani Nikula wrote:
>> On Tue, 20 Sep 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> > On Tue, Sep 20, 2016 at 11:57:06AM +0300, Jani Nikula wrote:
>> >> On Mon, 19 Sep 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
>> >> > On to, 2016-09-15 at 16:28 +0300, Jani Nikula wrote:
>> >> >> Fix sparse warnings:
>> >> >> 
>> >> >> drivers/gpu/drm/i915/i915_drv.c:1179:5: warning: symbol
>> >> >> 'i915_driver_load' was not declared. Should it be static?
>> >> >> 
>> >> >> drivers/gpu/drm/i915/i915_drv.c:1267:6: warning: symbol
>> >> >> 'i915_driver_unload' was not declared. Should it be static?
>> >> >> 
>> >> >> drivers/gpu/drm/i915/i915_drv.c:2444:25: warning: symbol 'i915_pm_ops'
>> >> >> was not declared. Should it be static?
>> >> >> 
>> >> >
>> >> > Hmm, Chris, were not these change in the middle of a series, did the
>> >> > cleanup patches just fall off?
>> >> 
>> >> Can we just please use whichever patches that fix the issue?
>> >
>> > It was deliberate placement to avoid having those symbols exposed to
>> > every user of i915_drv.h, i.e. everyone. Limit i915_drv.h to the
>> > interface exposed by i915_drv.c and so used only by a handful of files.
>> 
>> I can see that, but I prefer to get the warnings gone.
>
> Yeah, non-static declarations need to be in header files, otherwise
> there's not much point in them really (since the compiler can't compare
> the delcaration with the definition).
>
> we also need to split up our headers I think, and I plan to start doing
> that when extracting bits and pieces from intel_display.c. In drm core at
> least having 1:1 between headers and source files seems to work rather
> well.
>
> Meanwhile on Jani's patch:
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks, pushed to dinq.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/6] drm/i915: keep declarations in i915_drv.h
  2016-09-22 11:50           ` Daniel Vetter
  2016-09-22 12:11             ` Jani Nikula
@ 2016-09-26  6:32             ` Joonas Lahtinen
  1 sibling, 0 replies; 18+ messages in thread
From: Joonas Lahtinen @ 2016-09-26  6:32 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula; +Cc: intel-gfx

On to, 2016-09-22 at 13:50 +0200, Daniel Vetter wrote:
> we also need to split up our headers I think, and I plan to start doing
> that when extracting bits and pieces from intel_display.c. In drm core at
> least having 1:1 between headers and source files seems to work rather
> well.

+1 on that, I think all sane projects do that.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-09-26  6:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 13:28 [PATCH 1/6] drm/i915: make intel_dp_compute_bpp static Jani Nikula
2016-09-15 13:28 ` [PATCH 2/6] drm/i915: do not use 'false' as a NULL pointer Jani Nikula
2016-09-15 17:13   ` Pandiyan, Dhinakaran
2016-09-15 13:28 ` [PATCH 3/6] drm/i915: keep declarations in i915_drv.h Jani Nikula
2016-09-19 16:14   ` Joonas Lahtinen
2016-09-20  8:57     ` Jani Nikula
2016-09-20  9:29       ` Chris Wilson
2016-09-20  9:58         ` Jani Nikula
2016-09-22 11:50           ` Daniel Vetter
2016-09-22 12:11             ` Jani Nikula
2016-09-26  6:32             ` Joonas Lahtinen
2016-09-15 13:28 ` [PATCH 4/6] drm/i915: use NULL for NULL pointers Jani Nikula
2016-09-15 17:09   ` Pandiyan, Dhinakaran
2016-09-15 13:28 ` [PATCH 5/6] drm/i915: workaround sparse warning on variable length arrays Jani Nikula
2016-09-15 13:28 ` [PATCH 6/6] drm/i915: silence io mapping/unmapping sparse warnings on different address spaces Jani Nikula
2016-09-15 13:49 ` ✗ Fi.CI.BAT: warning for series starting with [1/6] drm/i915: make intel_dp_compute_bpp static Patchwork
2016-09-15 14:35 ` [PATCH 1/6] " Jim Bride
2016-09-16  7:45   ` Jani Nikula

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.