Skip to contentSkip to conversation

drm: Increase COMPILE_TEST=y coverage

PATCH Superseded Ville Syrjala 11 participants 47 messages Apr 8, 2024 – May 28, 2024

Subsystems (20)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover drm: Increase COMPILE_TEST=y coverage

From: Ville Syrjälä <[email protected]>

I got fed up having to build multiple architectures when doing subsystem wide refactoring. So I decided to attack the low hanging COMPILE_TEST=y fruit. Here are the results. All of these drivers now build with COMPILE_TEST=y on x86/x86_64

Ville Syrjälä (21):
drm/armada: Fix printk arguments
drm/armada: Fix armada_debugfs_crtc_reg_write() return type drm/armada: Allow build with COMPILE_TEST=y drm/imx/dcss: Fix 64bit divisions
drm/imx/dcss: Allow build with COMPILE_TEST=y drm/sti: Include linux/io.h for devm_ioremap() drm/sti: Allow build with COMPILE_TEST=y drm/hisilicon/kirin: Include linux/io.h for readl()/writel() drm/hisilicon/kirin: Fix 64bit divisions drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures drm/hisilicon/kirin: Allow build with COMPILE_TEST=y drm/tilcdc: Allow build without __iowmb() drm/tilcdc: Allow build with COMPILE_TEST=y drm/omap: Open code phys_to_page()
drm/omap: Allow build with COMPILE_TEST=y drm/atmel-hlcdc: Allow build with COMPILE_TEST=y drm/fsl-dcu: Allow build with COMPILE_TEST=y drm/mediatek: Allow build with COMPILE_TEST=y drm/meson: Allow build with COMPILE_TEST=y drm/rcar-du: Allow build with COMPILE_TEST=y drm/stm: Allow build with COMPILE_TEST=y

 drivers/gpu/drm/armada/Kconfig                  |  2 +-
 drivers/gpu/drm/armada/armada_debugfs.c         |  2 +-
 drivers/gpu/drm/armada/armada_gem.c             |  2 +-
 drivers/gpu/drm/atmel-hlcdc/Kconfig             |  2 +-
 drivers/gpu/drm/fsl-dcu/Kconfig                 |  2 +-
 drivers/gpu/drm/hisilicon/kirin/Kconfig         |  2 +-
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c    | 11 +++++------
 drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h    |  2 ++
 drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h |  2 +-
 drivers/gpu/drm/imx/dcss/Kconfig                |  2 +-
 drivers/gpu/drm/imx/dcss/dcss-scaler.c          |  4 ++--
 drivers/gpu/drm/mediatek/Kconfig                |  4 ++--
 drivers/gpu/drm/meson/Kconfig                   |  2 +-
 drivers/gpu/drm/omapdrm/Kconfig                 |  2 +-
 drivers/gpu/drm/omapdrm/omap_gem.c              |  4 ++--
 drivers/gpu/drm/renesas/rcar-du/Kconfig         |  2 +-
 drivers/gpu/drm/sti/Kconfig                     |  2 +-
 drivers/gpu/drm/sti/sti_dvo.c                   |  1 +
 drivers/gpu/drm/stm/Kconfig                     |  2 +-
 drivers/gpu/drm/tilcdc/Kconfig                  |  2 +-
 drivers/gpu/drm/tilcdc/tilcdc_regs.h            |  2 ++
 21 files changed, 30 insertions(+), 26 deletions(-)
Signature · 1 line
2.43.2
#1 lore raw

PATCH 1/21 drm/armada: Fix printk arguments

From: Ville Syrjälä <[email protected]>

../drivers/gpu/drm/armada/armada_gem.c: In function ‘armada_gem_pwrite_ioctl’:
../drivers/gpu/drm/armada/armada_gem.c:367:27: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

  367 |                 DRM_ERROR("invalid size: object size %u\n", dobj->obj.size);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
      |                                                                      |
      |                                                                      size_t {aka long unsigned int}
---
 drivers/gpu/drm/armada/armada_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/armada/armada_gem.c +1 -1
index 26d10065d534..e9575ef5aaef 100644
@@ -364,7 +364,7 @@ int armada_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 
 	if (args->offset > dobj->obj.size ||
 	    args->size > dobj->obj.size - args->offset) {
-		DRM_ERROR("invalid size: object size %u\n", dobj->obj.size);
+		DRM_ERROR("invalid size: object size %zu\n", dobj->obj.size);
 		ret = -EINVAL;
 		goto unref;
 	}
Signature · 1 line
2.43.2
#2 lore raw

PATCH 2/21 drm/armada: Fix armada_debugfs_crtc_reg_write() return type

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Change the armada_debugfs_crtc_reg_write() return type to the correct ssize_t. This makes the code actually build on certain architectures.

---
 drivers/gpu/drm/armada/armada_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/armada/armada_debugfs.c +1 -1
index 29f4b52e3c8d..338f0f6ca441 100644
@@ -48,7 +48,7 @@ static int armada_debugfs_crtc_reg_open(struct inode *inode, struct file *file)
 			   inode->i_private);
 }
 
-static int armada_debugfs_crtc_reg_write(struct file *file,
+static ssize_t armada_debugfs_crtc_reg_write(struct file *file,
 	const char __user *ptr, size_t len, loff_t *off)
 {
 	struct armada_crtc *dcrtc;
Signature · 1 line
2.43.2
#3 lore raw

PATCH 3/21 drm/armada: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow armada to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/armada/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/armada/Kconfig +1 -1
index e5597d7c9ae1..043ca103ab3f 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ARMADA
 	tristate "DRM support for Marvell Armada SoCs"
-	depends on DRM && HAVE_CLK && ARM && MMU
+	depends on DRM && HAVE_CLK && MMU && (ARM || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION
 	help
Signature · 1 line
2.43.2
#4 lore raw

PATCH 4/21 drm/imx/dcss: Fix 64bit divisions

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Use the appropriate 64bit division helpers to make the code build on 32bit architectures.

Cc Laurentiu Palcu <[email protected]>
Cc Lucas Stach <[email protected]>
---
 drivers/gpu/drm/imx/dcss/dcss-scaler.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/imx/dcss/dcss-scaler.c +2 -2
index 825728c356ff..32c3f46b21da 100644
@@ -136,7 +136,7 @@ static int div_q(int A, int B)
 	else
 		temp -= B / 2;
 
-	result = (int)(temp / B);
+	result = div_s64(temp, B);
 	return result;
 }
 
@@ -239,7 +239,7 @@ static void dcss_scaler_gaussian_filter(int fc_q, bool use_5_taps,
 			ll_temp = coef[phase][i];
 			ll_temp <<= PSC_COEFF_PRECISION;
 			ll_temp += sum >> 1;
-			ll_temp /= sum;
+			ll_temp = div_s64(ll_temp, sum);
 			coef[phase][i] = (int)ll_temp;
 		}
 	}
Signature · 1 line
2.43.2
#5 lore raw

PATCH 5/21 drm/imx/dcss: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow imx/dcss to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Laurentiu Palcu <[email protected]>
Cc Lucas Stach <[email protected]>

dpiormw.cocci

---
 drivers/gpu/drm/imx/dcss/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/imx/dcss/Kconfig +1 -1
index 3ffc061d392b..502612747007 100644
@@ -4,7 +4,7 @@ config DRM_IMX_DCSS
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select VIDEOMODE_HELPERS
-	depends on DRM && ARCH_MXC && ARM64
+	depends on DRM && ((ARCH_MXC && ARM64) || COMPILE_TEST)
 	help
 	  Choose this if you have a NXP i.MX8MQ based system and want to use the
 	  Display Controller Subsystem. This option enables DCSS support.
Signature · 1 line
2.43.2
#6 lore raw

PATCH 6/21 drm/sti: Include linux/io.h for devm_ioremap()

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Include linux/io.h for devm_ioremap().

When built on x86_64 w/ COMPILE_TEST=y:
../drivers/gpu/drm/sti/sti_dvo.c:531:21: error: implicit declaration of function ‘devm_ioremap’ [-Werror=implicit-function-declaration]
531 | dvo->regs = devm_ioremap(dev, res->start,

      |                     ^~~~~~~~~~~~

../drivers/gpu/drm/sti/sti_dvo.c:531:19: error: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
531 | dvo->regs = devm_ioremap(dev, res->start,
| ^

---
 drivers/gpu/drm/sti/sti_dvo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/sti/sti_dvo.c +1 -0
index fd1df4ce3852..48a5d49fc131 100644
@@ -7,6 +7,7 @@
 #include <linux/clk.h>
 #include <linux/component.h>
 #include <linux/debugfs.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
Signature · 1 line
2.43.2
maintainer Acked-by on v1 6/21
#7 lore raw

Re: [PATCH 06/21] drm/sti: Include linux/io.h for devm_ioremap()

Hi Ville,

thank you for your patch.

Quoted 33 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Include linux/io.h for devm_ioremap().

When built on x86_64 w/ COMPILE_TEST=y:
../drivers/gpu/drm/sti/sti_dvo.c:531:21: error: implicit declaration of function ‘devm_ioremap’ [-Werror=implicit-function-declaration]
531 | dvo->regs = devm_ioremap(dev, res->start,

      |                     ^~~~~~~~~~~~

../drivers/gpu/drm/sti/sti_dvo.c:531:19: error: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
531 | dvo->regs = devm_ioremap(dev, res->start,
| ^

---
 drivers/gpu/drm/sti/sti_dvo.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/sti/sti_dvo.c +1 -0
index fd1df4ce3852..48a5d49fc131 100644
@@ -7,6 +7,7 @@
 #include <linux/clk.h>
 #include <linux/component.h>
 #include <linux/debugfs.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
Signature · 1 line
2.43.2

Alain

#8 lore raw

PATCH 7/21 drm/sti: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow sti to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/sti/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sti/Kconfig +1 -1
index 3c7a5feff8de..75c301aadcbc 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_STI
 	tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
-	depends on OF && DRM && ARCH_STI
+	depends on OF && DRM && (ARCH_STI || COMPILE_TEST)
 	select RESET_CONTROLLER
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 1 line
2.43.2
maintainer Acked-by on v1 7/21
#9 lore raw

Re: [PATCH 07/21] drm/sti: Allow build with COMPILE_TEST=y

Hi Ville,

thank you for your patch.

Quoted 27 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow sti to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/sti/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sti/Kconfig +1 -1
index 3c7a5feff8de..75c301aadcbc 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_STI
 	tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
-	depends on OF && DRM && ARCH_STI
+	depends on OF && DRM && (ARCH_STI || COMPILE_TEST)
 	select RESET_CONTROLLER
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 1 line
2.43.2

Alain

#10 lore raw

Re: [PATCH 07/21] drm/sti: Allow build with COMPILE_TEST=y

Quoted 26 lines · Alain Volmat

Hi Ville,

thank you for your patch.

Quoted 21 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow sti to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/sti/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sti/Kconfig +1 -1
index 3c7a5feff8de..75c301aadcbc 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_STI
 	tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
-	depends on OF && DRM && ARCH_STI
+	depends on OF && DRM && (ARCH_STI || COMPILE_TEST)
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/sti/Kconfig +0 -0
 	select RESET_CONTROLLER
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 1 line
2.43.2

Thanks. Pushed both sti patches to drm-misc-next.

Signature · 2 lines
Ville Syrjälä
Intel
#11 lore raw

PATCH 8/21 drm/hisilicon/kirin: Include linux/io.h for readl()/writel()

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Include linux/io.h for readl()/writel().

When built on x86_64 w/ COMPILE_TEST=y:
../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:93:16: error: implicit declaration of function ‘readl’ [-Werror=implicit-function-declaration]

   93 |         orig = readl(addr);
      |                ^~~~~
../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:96:9: error: implicit declaration of function ‘writel’ [-Werror=implicit-function-declaration]
   96 |         writel(tmp, addr);
      |         ^~~~~~
Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
---
 drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h +2 -0
index d79fc031e53d..a87d1135856f 100644
@@ -7,6 +7,8 @@
 #ifndef __DW_DSI_REG_H__
 #define __DW_DSI_REG_H__
 
+#include <linux/io.h>
+
 #define MASK(x)				(BIT(x) - 1)
 
 /*
Signature · 1 line
2.43.2
reviewer Acked-by on v1 8/21
#12 lore raw

Re: [PATCH 08/21] drm/hisilicon/kirin: Include linux/io.h for readl()/writel()

Quoted 13 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Include linux/io.h for readl()/writel().

When built on x86_64 w/ COMPILE_TEST=y:
../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:93:16: error: implicit declaration of function ‘readl’ [-Werror=implicit-function-declaration]

   93 |         orig = readl(addr);
      |                ^~~~~
../drivers/gpu/drm/hisilicon/kirin/dw_dsi_reg.h:96:9: error: implicit declaration of function ‘writel’ [-Werror=implicit-function-declaration]
   96 |         writel(tmp, addr);
      |         ^~~~~~
Quoted 7 lines
Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
#13 lore raw

PATCH 9/21 drm/hisilicon/kirin: Fix 64bit divisions

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Use the appropriate 64bit division helpers to make the code build on 32bit architectures.

Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +5 -6
index 566de4658719..a39cc549c20b 100644
@@ -157,8 +157,8 @@ static u32 dsi_calc_phy_rate(u32 req_kHz, struct mipi_phy_params *phy)
 			q_pll = 0x10 >> (7 - phy->hstx_ckg_sel);
 
 		temp = f_kHz * (u64)q_pll * (u64)ref_clk_ps;
-		m_n_int = temp / (u64)1000000000;
-		m_n = (temp % (u64)1000000000) / (u64)100000000;
+		m_n_int = div64_u64_rem(temp, 1000000000, &temp);
+		m_n = div_u64(temp, 100000000);
 
 		if (m_n_int % 2 == 0) {
 			if (m_n * 6 >= 50) {
@@ -229,9 +229,8 @@ static u32 dsi_calc_phy_rate(u32 req_kHz, struct mipi_phy_params *phy)
 			phy->pll_fbd_div5f = 1;
 		}
 
-		f_kHz = (u64)1000000000 * (u64)m_pll /
-			((u64)ref_clk_ps * (u64)n_pll * (u64)q_pll);
-
+		f_kHz = div64_u64((u64)1000000000 * (u64)m_pll,
+				  (u64)ref_clk_ps * (u64)n_pll * (u64)q_pll);
 		if (f_kHz >= req_kHz)
 			break;
 
@@ -490,7 +489,7 @@ static void dsi_set_mode_timing(void __iomem *base,
 	hsa_time = (hsw * lane_byte_clk_kHz) / pixel_clk_kHz;
 	hbp_time = (hbp * lane_byte_clk_kHz) / pixel_clk_kHz;
 	tmp = (u64)htot * (u64)lane_byte_clk_kHz;
-	hline_time = DIV_ROUND_UP(tmp, pixel_clk_kHz);
+	hline_time = DIV_ROUND_UP_ULL(tmp, pixel_clk_kHz);
 
 	/* all specified in byte-lane clocks */
 	writel(hsa_time, base + VID_HSA_TIME);
Signature · 1 line
2.43.2
reviewer Acked-by on v1 9/21
#14 lore raw

Re: [PATCH 09/21] drm/hisilicon/kirin: Fix 64bit divisions

Quoted 6 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Use the appropriate 64bit division helpers to make the code build on 32bit architectures.

Quoted 7 lines
Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
#15 lore raw

PATCH 10/21 drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

BIT(32) is illegal when sizeof(long)==4. Use BIT_ULL(32) instead.

Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
---
 drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h +1 -1
index be9e789c2d04..36f923cc7594 100644
@@ -10,7 +10,7 @@
 /*
  * ADE Registers
  */
-#define MASK(x)				(BIT(x) - 1)
+#define MASK(x)				(BIT_ULL(x) - 1)
 
 #define ADE_CTRL			0x0004
 #define FRM_END_START_OFST		0
Signature · 1 line
2.43.2
reviewer Acked-by on v1 10/21
#16 lore raw

Re: [PATCH 10/21] drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures

Quoted 6 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

BIT(32) is illegal when sizeof(long)==4. Use BIT_ULL(32) instead.

Quoted 7 lines
Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
#17 lore raw

PATCH 11/21 drm/hisilicon/kirin: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow kirin to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
---
 drivers/gpu/drm/hisilicon/kirin/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/kirin/Kconfig +1 -1
index c5265675bf0c..0772f79567ef 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_HISI_KIRIN
 	tristate "DRM Support for Hisilicon Kirin series SoCs Platform"
-	depends on DRM && OF && ARM64
+	depends on DRM && OF && (ARM64 || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_MIPI_DSI
Signature · 1 line
2.43.2
reviewer Acked-by on v1 11/21
#18 lore raw

Re: [PATCH 11/21] drm/hisilicon/kirin: Allow build with COMPILE_TEST=y

Quoted 6 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow kirin to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Quoted 7 lines
Cc Xinliang Liu <[email protected]>
Cc Tian Tao <[email protected]>
Cc Xinwei Kong <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Yongqin Liu <[email protected]>
Cc John Stultz <[email protected]>
#19 lore raw

PATCH 12/21 drm/tilcdc: Allow build without __iowmb()

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
 drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +2 -0
index f90e2dc3457c..44e4ada30fba 100644
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
 	iowrite64(data, addr);
 #else
+#ifdef __iowmb
 	__iowmb();
+#endif
 	/* This compiles to strd (=64-bit write) on ARM7 */
 	*(volatile u64 __force *)addr = __cpu_to_le64(data);
 #endif
Signature · 1 line
2.43.2
maintainer
#20 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

Quoted 18 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +0 -0
index f90e2dc3457c..44e4ada30fba 100644

drivers/gpu/drm/tilcdc/tilcdc_regs.h static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data) · line 133

Quoted 9 lines
drivers/gpu/drm/tilcdc/tilcdc_regs.h +2 -0
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
  #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
  	iowrite64(data, addr);
  #else
+#ifdef __iowmb
  	__iowmb();
+#endif
  	/* This compiles to strd (=64-bit write) on ARM7 */
  	*(volatile u64 __force *)addr = __cpu_to_le64(data);
  #endif

As the memory barrier is an important part there, would it be better to ifdef based on COMPILE_TEST, to make it clear why it's being done?

Tomi

#21 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

Quoted 23 lines · Tomi Valkeinen
Quoted 22 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
index f90e2dc3457c..44e4ada30fba 100644
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
  #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
  	iowrite64(data, addr);
  #else
+#ifdef __iowmb
Quoted 8 lines

drivers/gpu/drm/tilcdc/tilcdc_regs.h static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data) · line 133

Quoted 5 lines
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
  	__iowmb();
+#endif
  	/* This compiles to strd (=64-bit write) on ARM7 */
  	*(volatile u64 __force *)addr = __cpu_to_le64(data);
  #endif

As the memory barrier is an important part there, would it be better to ifdef based on COMPILE_TEST, to make it clear why it's being done?

I can do that if you prefer.

I suppose the real question is why iowrite64() doesn't work if a hand rolled version does work?

Signature · 2 lines
Ville Syrjälä
Intel
maintainer
#22 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

Quoted 33 lines · Ville Syrjälä
Quoted 23 lines · Tomi Valkeinen
Quoted 22 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
   drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
   1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
index f90e2dc3457c..44e4ada30fba 100644
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
   #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
   	iowrite64(data, addr);
   #else
+#ifdef __iowmb
Quoted 8 lines

drivers/gpu/drm/tilcdc/tilcdc_regs.h static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data) · line 133

Quoted 5 lines
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
   	__iowmb();
+#endif
   	/* This compiles to strd (=64-bit write) on ARM7 */
   	*(volatile u64 __force *)addr = __cpu_to_le64(data);
   #endif

As the memory barrier is an important part there, would it be better to ifdef based on COMPILE_TEST, to make it clear why it's being done?

Quoted 4 lines

I can do that if you prefer.

I suppose the real question is why iowrite64() doesn't work if a hand rolled version does work?

If I recall right, there is (was?) no iowrite64. The bus is 32 bit anyway. But the two 32 bit registers written with the tilcdc_write64() have an annoying HW race, so we tried to find a method of writing them that reduces the chance of race to a minimum.

Tomi

#23 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

In reply to Ville Syrjälä
Quoted 33 lines · Ville Syrjälä
Quoted 23 lines · Tomi Valkeinen
Quoted 22 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
index f90e2dc3457c..44e4ada30fba 100644
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
  #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
  	iowrite64(data, addr);
  #else
+#ifdef __iowmb
Quoted 8 lines

drivers/gpu/drm/tilcdc/tilcdc_regs.h static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data) · line 133

Quoted 5 lines
drivers/gpu/drm/tilcdc/tilcdc_regs.h +1 -0
  	__iowmb();
+#endif
  	/* This compiles to strd (=64-bit write) on ARM7 */
  	*(volatile u64 __force *)addr = __cpu_to_le64(data);
  #endif

As the memory barrier is an important part there, would it be better to ifdef based on COMPILE_TEST, to make it clear why it's being done?

Quoted 1 line

I can do that if you prefer.

What if someone tries to actually boot a kernel built with COMPILE_TEST=y on a machine with this hardware?

Signature · 2 lines
Ville Syrjälä
Intel
maintainer
#24 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

Quoted 34 lines · Ville Syrjälä
Quoted 33 lines · Ville Syrjälä
Quoted 31 lines · Tomi Valkeinen
Quoted 18 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
   drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
   1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +0 -0
index f90e2dc3457c..44e4ada30fba 100644

drivers/gpu/drm/tilcdc/tilcdc_regs.h static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data) · line 133

Quoted 9 lines
drivers/gpu/drm/tilcdc/tilcdc_regs.h +2 -0
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
   #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
   	iowrite64(data, addr);
   #else
+#ifdef __iowmb
   	__iowmb();
+#endif
   	/* This compiles to strd (=64-bit write) on ARM7 */
   	*(volatile u64 __force *)addr = __cpu_to_le64(data);
   #endif

As the memory barrier is an important part there, would it be better to ifdef based on COMPILE_TEST, to make it clear why it's being done?

Quoted 4 lines
Quoted 1 line

I can do that if you prefer.

What if someone tries to actually boot a kernel built with COMPILE_TEST=y on a machine with this hardware?

Ah, right...

#ifndef __iowmb
#define __iowmb BUG
#endif

? =)

Maybe go with the original one, but with a comment like "allow compilation without __iowmb() for COMPILE_TEST" or such.

Tomi

#25 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

In reply to Ville Syrjälä
Quoted 4 lines · Ville Syrjälä

What if someone tries to actually boot a kernel built with COMPILE_TEST=y on a machine with this hardware?

I doubt there is am335x HW out there with enough memory to load COMPILE_TEST=y kernel.

BR,
Jyri

#26 lore raw

PATCH 13/21 drm/tilcdc: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow tilcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
 drivers/gpu/drm/tilcdc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/Kconfig +1 -1
index d3bd2d7a181e..1897ef91c70b 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_TILCDC
 	tristate "DRM Support for TI LCDC Display Controller"
-	depends on DRM && OF && ARM
+	depends on DRM && OF && (ARM || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_BRIDGE
Signature · 1 line
2.43.2
maintainer Reviewed-by on v1 13/21
#27 lore raw

Re: [PATCH 13/21] drm/tilcdc: Allow build with COMPILE_TEST=y

Quoted 17 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow tilcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/tilcdc/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/Kconfig +0 -0
index d3bd2d7a181e..1897ef91c70b 100644

drivers/gpu/drm/tilcdc/Kconfig line 7

Quoted 8 lines
drivers/gpu/drm/tilcdc/Kconfig +1 -1
@@ -1,7 +1,7 @@
  # SPDX-License-Identifier: GPL-2.0-only
  config DRM_TILCDC
  	tristate "DRM Support for TI LCDC Display Controller"
-	depends on DRM && OF && ARM
+	depends on DRM && OF && (ARM || COMPILE_TEST)
  	select DRM_KMS_HELPER
  	select DRM_GEM_DMA_HELPER
  	select DRM_BRIDGE

Tomi

#28 lore raw

PATCH 14/21 drm/omap: Open code phys_to_page()

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

phys_to_page() is not available on most architectures. Just open code it like msm does. Allows COMPILE_TEST=y builds of omapdrm on other architectures.

---
 drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/omap_gem.c +2 -2
index 3421e8389222..c4454e7f1c94 100644
@@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj,
 
 	if (addr) {
 		for_each_sg(sgt->sgl, sg, count, i) {
-			sg_set_page(sg, phys_to_page(addr), len,
-				offset_in_page(addr));
+			sg_set_page(sg, pfn_to_page(__phys_to_pfn(addr)),
+				    len, offset_in_page(addr));
 			sg_dma_address(sg) = addr;
 			sg_dma_len(sg) = len;
 
Signature · 1 line
2.43.2
maintainer Reviewed-by on v1 14/21
#29 lore raw

Re: [PATCH 14/21] drm/omap: Open code phys_to_page()

Quoted 17 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

phys_to_page() is not available on most architectures. Just open code it like msm does. Allows COMPILE_TEST=y builds of omapdrm on other architectures.

---
  drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/omap_gem.c +0 -0
index 3421e8389222..c4454e7f1c94 100644

drivers/gpu/drm/omapdrm/omap_gem.c struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj, · line 1029

Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_gem.c +2 -2
@@ -1022,8 +1022,8 @@ struct sg_table *omap_gem_get_sg(struct drm_gem_object *obj,
 
  	if (addr) {
  		for_each_sg(sgt->sgl, sg, count, i) {
-			sg_set_page(sg, phys_to_page(addr), len,
-				offset_in_page(addr));
+			sg_set_page(sg, pfn_to_page(__phys_to_pfn(addr)),
+				    len, offset_in_page(addr));
  			sg_dma_address(sg) = addr;
  			sg_dma_len(sg) = len;
 

Tomi

#30 lore raw

PATCH 15/21 drm/omap: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow omapdrm to be built with COMPILE_TEST=y for greater coverage.

FIXME: Still borked due to ?

---
 drivers/gpu/drm/omapdrm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/Kconfig +1 -1
index 6c49270cb290..85ed92042b74 100644
@@ -2,7 +2,7 @@
 config DRM_OMAP
 	tristate "OMAP DRM"
 	depends on DRM && OF
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || COMPILE_TEST
 	select DRM_KMS_HELPER
 	select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	select VIDEOMODE_HELPERS
Signature · 1 line
2.43.2
#31 lore raw

Re: [PATCH 15/21] drm/omap: Allow build with COMPILE_TEST=y

Quoted 6 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow omapdrm to be built with COMPILE_TEST=y for greater coverage.

FIXME: Still borked due to ?

In fact not borked anymore. Just forgot to update
the commit message.

Quoted 22 lines
---
 drivers/gpu/drm/omapdrm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/Kconfig +1 -1
index 6c49270cb290..85ed92042b74 100644
@@ -2,7 +2,7 @@
 config DRM_OMAP
 	tristate "OMAP DRM"
 	depends on DRM && OF
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || COMPILE_TEST
 	select DRM_KMS_HELPER
 	select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	select VIDEOMODE_HELPERS
Signature · 1 line
2.43.2
Signature · 2 lines
Ville Syrjälä
Intel
maintainer Reviewed-by on v1 15/21
#32 lore raw

Re: [PATCH 15/21] drm/omap: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala
Quoted 18 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow omapdrm to be built with COMPILE_TEST=y for greater coverage.

FIXME: Still borked due to ?

---
  drivers/gpu/drm/omapdrm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/Kconfig +0 -0
index 6c49270cb290..85ed92042b74 100644

drivers/gpu/drm/omapdrm/Kconfig line 8

Quoted 8 lines
drivers/gpu/drm/omapdrm/Kconfig +1 -1
@@ -2,7 +2,7 @@
  config DRM_OMAP
  	tristate "OMAP DRM"
  	depends on DRM && OF
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS || COMPILE_TEST
  	select DRM_KMS_HELPER
  	select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
  	select VIDEOMODE_HELPERS

Tomi

#33 lore raw

PATCH 16/21 drm/atmel-hlcdc: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow atmel-hlcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Sam Ravnborg <[email protected]>
Cc Boris Brezillon <[email protected]>
---
 drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/atmel-hlcdc/Kconfig +1 -1
index 3bdbab3a6333..945f3aa7bb24 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ATMEL_HLCDC
 	tristate "DRM Support for ATMEL HLCDC Display Controller"
-	depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && ARM
+	depends on DRM && OF && COMMON_CLK && ((MFD_ATMEL_HLCDC && ARM) || COMPILE_TEST)
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
Signature · 1 line
2.43.2
Acked-by on v1 16/21
#34 lore raw

Re: [PATCH 16/21] drm/atmel-hlcdc: Allow build with COMPILE_TEST=y

Quoted 8 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow atmel-hlcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Sam Ravnborg <[email protected]>
Cc Boris Brezillon <[email protected]>
Quoted 19 lines
---
 drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/atmel-hlcdc/Kconfig +1 -1
index 3bdbab3a6333..945f3aa7bb24 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ATMEL_HLCDC
 	tristate "DRM Support for ATMEL HLCDC Display Controller"
-	depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && ARM
+	depends on DRM && OF && COMMON_CLK && ((MFD_ATMEL_HLCDC && ARM) || COMPILE_TEST)
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
 	select DRM_PANEL
Signature · 1 line
2.43.2
#35 lore raw

PATCH 17/21 drm/fsl-dcu: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow fsl-dcu to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Stefan Agner <[email protected]>
Cc Alison Wang <[email protected]>
---
 drivers/gpu/drm/fsl-dcu/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/fsl-dcu/Kconfig +1 -1
index 5ca71ef87325..9c9954a5e9bc 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_FSL_DCU
 	tristate "DRM Support for Freescale DCU"
-	depends on DRM && OF && ARM && COMMON_CLK
+	depends on DRM && OF && (ARM || COMPILE_TEST) && COMMON_CLK
 	select BACKLIGHT_CLASS_DEVICE
 	select DRM_GEM_DMA_HELPER
 	select DRM_KMS_HELPER
Signature · 1 line
2.43.2
#36 lore raw

PATCH 18/21 drm/mediatek: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow mediatek to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/mediatek/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/mediatek/Kconfig +2 -2
index 6caab8d4d4e0..d770936e238b 100644
@@ -2,9 +2,9 @@
 config DRM_MEDIATEK
 	tristate "DRM Support for Mediatek SoCs"
 	depends on DRM
-	depends on ARCH_MEDIATEK || (ARM && COMPILE_TEST)
+	depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
 	depends on COMMON_CLK
-	depends on HAVE_ARM_SMCCC
+	depends on HAVE_ARM_SMCCC || COMPILE_TEST
 	depends on OF
 	depends on MTK_MMSYS
 	select DRM_KMS_HELPER
Signature · 1 line
2.43.2
#37 lore raw

PATCH 19/21 drm/meson: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow meson to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/meson/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/Kconfig +1 -1
index 5520b9e3f010..d8f67bd9c755 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_MESON
 	tristate "DRM Support for Amlogic Meson Display Controller"
-	depends on DRM && OF && (ARM || ARM64)
+	depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST)
 	depends on ARCH_MESON || COMPILE_TEST
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 7 lines
2.43.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#38 lore raw

Re: [PATCH 19/21] drm/meson: Allow build with COMPILE_TEST=y

Quoted 9 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow meson to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Thank you for spotting this Ville!

Quoted 9 lines
---
 drivers/gpu/drm/meson/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/meson/Kconfig +0 -0
index 5520b9e3f010..d8f67bd9c755 100644

drivers/gpu/drm/meson/Kconfig line 4

Quoted 5 lines
drivers/gpu/drm/meson/Kconfig +1 -1
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_MESON
        tristate "DRM Support for Amlogic Meson Display Controller"
-       depends on DRM && OF && (ARM || ARM64)
+       depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST)

Neil, I wonder if we should just have "depends on DRM && OF" here as the next line already has:

drivers/gpu/drm/meson/Kconfig line 5

Quoted 1 line
drivers/gpu/drm/meson/Kconfig +0 -0
        depends on ARCH_MESON || COMPILE_TEST

ARCH_MESON is only defined for ARM and ARM64

#39 lore raw

PATCH 20/21 drm/rcar-du: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow rcar-du to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/renesas/rcar-du/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/renesas/rcar-du/Kconfig +1 -1
index 2dc739db2ba3..df8b08b1e537 100644
@@ -2,7 +2,7 @@
 config DRM_RCAR_DU
 	tristate "DRM Support for R-Car Display Unit"
 	depends on DRM && OF
-	depends on ARM || ARM64
+	depends on ARM || ARM64 || COMPILE_TEST
 	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 1 line
2.43.2
Reviewed-by on v1 20/21
#40 lore raw

Re: [PATCH 20/21] drm/rcar-du: Allow build with COMPILE_TEST=y

Quoted 4 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow rcar-du to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Also on rv64 and m68k.

Quoted 4 lines

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Reviewed-by on v1 20/21
#41 lore raw

Re: [PATCH 20/21] drm/rcar-du: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

Hi Ville,

Thank you for the patch.

Quoted 18 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow rcar-du to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

---
 drivers/gpu/drm/renesas/rcar-du/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/renesas/rcar-du/Kconfig +0 -0
index 2dc739db2ba3..df8b08b1e537 100644

drivers/gpu/drm/renesas/rcar-du/Kconfig line 5

Quoted 5 lines
drivers/gpu/drm/renesas/rcar-du/Kconfig +1 -1
@@ -2,7 +2,7 @@
 config DRM_RCAR_DU
 	tristate "DRM Support for R-Car Display Unit"
 	depends on DRM && OF
-	depends on ARM || ARM64
+	depends on ARM || ARM64 || COMPILE_TEST

I'll trust 0-day to tell us if this causes any issue on exotic (from the R-Car DU driver's point of view) platforms.

I expect you to push this patch, please let me know if you don't intend to.

Quoted 3 lines
drivers/gpu/drm/renesas/rcar-du/Kconfig +0 -0
 	depends on ARCH_RENESAS || COMPILE_TEST
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
Signature · 3 lines
Regards,

Laurent Pinchart
#42 lore raw

PATCH 21/21 drm/stm: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow stm to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Yannick Fertre <[email protected]>
Cc Raphael Gallais-Pou <[email protected]>
Cc Philippe Cornu <[email protected]>
---
 drivers/gpu/drm/stm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/stm/Kconfig +1 -1
index fa49cde43bb2..4c906d602825 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_STM
 	tristate "DRM Support for STMicroelectronics SoC Series"
-	depends on DRM && ARCH_STM32
+	depends on DRM && (ARCH_STM32 || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_PANEL_BRIDGE
Signature · 1 line
2.43.2
maintainer Acked-by on v1 21/21
#43 lore raw

Re: [PATCH 21/21] drm/stm: Allow build with COMPILE_TEST=y

Hi Ville

Quoted 9 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow stm to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Yannick Fertre <[email protected]>
Cc Raphael Gallais-Pou <[email protected]>
Cc Philippe Cornu <[email protected]>

Thank you for this ! :)

Quoted 17 lines
---
 drivers/gpu/drm/stm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/stm/Kconfig +1 -1
index fa49cde43bb2..4c906d602825 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_STM
 	tristate "DRM Support for STMicroelectronics SoC Series"
-	depends on DRM && ARCH_STM32
+	depends on DRM && (ARCH_STM32 || COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
 	select DRM_PANEL_BRIDGE
Acked-by Jyri Sarha on the v1 series
#44 lore raw

Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()

In reply to Ville Syrjala
Quoted 10 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

__iowmb() isn't available on most architectures. Make its use optional so that the driver can be built on other architectures with COMPILE_TEST=y.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Thanks,
Jyri

Quoted 21 lines

---
drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++

1 file changed, 2 insertions(+)
drivers/gpu/drm/tilcdc/tilcdc_regs.h +2 -0
index f90e2dc3457c..44e4ada30fba 100644
@@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
 #if defined(iowrite64) !defined(iowrite64_is_nonatomic)
 iowrite64(data, addr);
 #else
+#ifdef __iowmb
 __iowmb();
+#endif
 /* This compiles to strd (=64-bit write) on ARM7 */
 *(volatile u64 __force *)addr = __cpu_to_le64(data);
 #endif
Signature · 1 line
2.43.2
Acked-by Jyri Sarha on the v1 series
#45 lore raw

Re: [PATCH 13/21] drm/tilcdc: Allow build with COMPILE_TEST=y

In reply to Ville Syrjala
Quoted 9 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Allow tilcdc to be built with COMPILE_TEST=y for greater coverage. Builds fine on x86/x86_64 at least.

Cc Jyri Sarha <[email protected]>
Cc Tomi Valkeinen <[email protected]>

Thanks,
Jyri

Quoted 20 lines

---
drivers/gpu/drm/tilcdc/Kconfig | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/Kconfig +0 -0
index d3bd2d7a181e..1897ef91c70b 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only

config DRM_TILCDC
tristate "DRM Support for TI LCDC Display Controller"
- depends on DRM OF && ARM
+ depends on DRM && OF && (ARM || COMPILE_TEST) select DRM_KMS_HELPER
select DRM_GEM_DMA_HELPER
select DRM_BRIDGE

Signature · 1 line
2.43.2
#46 lore raw
In reply to Ville Syrjala
Quoted 8 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

I got fed up having to build multiple architectures when doing subsystem wide refactoring. So I decided to attack the low hanging COMPILE_TEST=y fruit. Here are the results. All of these drivers now build with COMPILE_TEST=y on x86/x86_64

Quoted 10 lines

Ville Syrjälä (21):
drm/hisilicon/kirin: Include linux/io.h for readl()/writel() drm/hisilicon/kirin: Fix 64bit divisions drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures drm/hisilicon/kirin: Allow build with COMPILE_TEST=y drm/omap: Open code phys_to_page()
drm/omap: Allow build with COMPILE_TEST=y drm/atmel-hlcdc: Allow build with COMPILE_TEST=y drm/rcar-du: Allow build with COMPILE_TEST=y drm/stm: Allow build with COMPILE_TEST=y

^ pushed to drm-misc-next. Thanks for the reviews.

Quoted 10 lines

drm/armada: Fix printk arguments
drm/armada: Fix armada_debugfs_crtc_reg_write() return type drm/armada: Allow build with COMPILE_TEST=y drm/imx/dcss: Fix 64bit divisions
drm/imx/dcss: Allow build with COMPILE_TEST=y drm/sti: Include linux/io.h for devm_ioremap() drm/sti: Allow build with COMPILE_TEST=y drm/fsl-dcu: Allow build with COMPILE_TEST=y drm/mediatek: Allow build with COMPILE_TEST=y drm/meson: Allow build with COMPILE_TEST=y

^ are all still without comments.

Quoted 2 lines

drm/tilcdc: Allow build without __iowmb() drm/tilcdc: Allow build with COMPILE_TEST=y

^ I need to respin.

Signature · 2 lines
Ville Syrjälä
Intel