All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check
@ 2019-05-24 13:06 Hans de Goede
  2019-05-24 13:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Hans de Goede @ 2019-05-24 13:06 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Ville Syrjälä,
	Rodrigo Vivi
  Cc: Hans de Goede, intel-gfx, dri-devel, stable

Prior to this commit we fail to init the DSI panel on the GPD MicroPC:
https://www.indiegogo.com/projects/gpd-micropc-6-inch-handheld-industry-laptop#/

The problem is intel_dsi_vbt_init() failing with the following error:
*ERROR* Burst mode freq is less than computed

The pclk in the VBT panel modeline is 70000, together with 24 bpp and
4 lines this results in a bitrate value of 70000 * 24 / 4 = 420000.
But the target_burst_mode_freq in the VBT is 418000.

This commit works around this problem by adding an intel_fuzzy_clock_check
when target_burst_mode_freq < bitrate and setting target_burst_mode_freq to
bitrate when that checks succeeds, fixing the panel not working.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/intel_dsi_vbt.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
index 022bf59418df..a2a9b9d0eeaa 100644
--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
@@ -895,6 +895,17 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
 		if (mipi_config->target_burst_mode_freq) {
 			u32 bitrate = intel_dsi_bitrate(intel_dsi);
 
+			/*
+			 * Sometimes the VBT contains a slightly lower clock,
+			 * then the bitrate we have calculated, in this case
+			 * just replace it with the calculated bitrate.
+			 */
+			if (mipi_config->target_burst_mode_freq < bitrate &&
+			    intel_fuzzy_clock_check(
+					mipi_config->target_burst_mode_freq,
+					bitrate))
+				mipi_config->target_burst_mode_freq = bitrate;
+
 			if (mipi_config->target_burst_mode_freq < bitrate) {
 				DRM_ERROR("Burst mode freq is less than computed\n");
 				return false;
-- 
2.21.0


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

* ✗ Fi.CI.BAT: failure for drm/i915/dsi: Use a fuzzy check for burst mode clock check
  2019-05-24 13:06 [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check Hans de Goede
@ 2019-05-24 13:28 ` Patchwork
  2019-05-24 14:49   ` Hans de Goede
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-05-24 13:28 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/dsi: Use a fuzzy check for burst mode clock check
URL   : https://patchwork.freedesktop.org/series/61105/
State : failure

== Summary ==

CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  AR      drivers/gpu/drm/i915/built-in.a
  CC [M]  drivers/gpu/drm/i915/header_test_i915_active_types.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_debugfs.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_drv.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_gem_context_types.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_gem_pm.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_irq.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_params.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_priolist_types.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_reg.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_scheduler_types.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_timeline_types.o
  CC [M]  drivers/gpu/drm/i915/header_test_i915_utils.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_acpi.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_atomic.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_atomic_plane.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_audio.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_bios.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_cdclk.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_color.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_combo_phy.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_connector.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_crt.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_csr.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_ddi.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dp.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dp_aux_backlight.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dp_link_training.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dp_mst.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dpio_phy.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dpll_mgr.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_drv.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dsi.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dsi_dcs_backlight.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dvo.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_dvo_dev.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_fbc.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_fbdev.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_fifo_underrun.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_frontbuffer.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_gmbus.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_hdcp.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_hdmi.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_hotplug.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_lpe_audio.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_lspcon.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_lvds.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_overlay.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_panel.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_pipe_crc.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_pm.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_psr.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_quirks.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_runtime_pm.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_sdvo.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_sideband.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_sprite.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_tv.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_uncore.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_vdsc.o
  CC [M]  drivers/gpu/drm/i915/header_test_intel_wakeref.o
  CC [M]  drivers/gpu/drm/i915/intel_dsi_vbt.o
drivers/gpu/drm/i915/intel_dsi_vbt.c: In function ‘intel_dsi_vbt_init’:
drivers/gpu/drm/i915/intel_dsi_vbt.c:867:8: error: implicit declaration of function ‘intel_fuzzy_clock_check’; did you mean ‘intel_guc_log_create’? [-Werror=implicit-function-declaration]
        intel_fuzzy_clock_check(
        ^~~~~~~~~~~~~~~~~~~~~~~
        intel_guc_log_create
cc1: all warnings being treated as errors
scripts/Makefile.build:278: recipe for target 'drivers/gpu/drm/i915/intel_dsi_vbt.o' failed
make[4]: *** [drivers/gpu/drm/i915/intel_dsi_vbt.o] Error 1
scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:489: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1071: recipe for target 'drivers' failed
make: *** [drivers] Error 2

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

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

* Re: [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check
  2019-05-24 13:06 [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check Hans de Goede
@ 2019-05-24 14:49   ` Hans de Goede
  2019-05-24 14:49   ` Hans de Goede
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2019-05-24 14:49 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Ville Syrjälä,
	Rodrigo Vivi
  Cc: intel-gfx, dri-devel, stable

Hi,

On 5/24/19 3:06 PM, Hans de Goede wrote:
> Prior to this commit we fail to init the DSI panel on the GPD MicroPC:
> https://www.indiegogo.com/projects/gpd-micropc-6-inch-handheld-industry-laptop#/
> 
> The problem is intel_dsi_vbt_init() failing with the following error:
> *ERROR* Burst mode freq is less than computed
> 
> The pclk in the VBT panel modeline is 70000, together with 24 bpp and
> 4 lines this results in a bitrate value of 70000 * 24 / 4 = 420000.
> But the target_burst_mode_freq in the VBT is 418000.
> 
> This commit works around this problem by adding an intel_fuzzy_clock_check
> when target_burst_mode_freq < bitrate and setting target_burst_mode_freq to
> bitrate when that checks succeeds, fixing the panel not working.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

I just realized that this patch depends on a patch from another series of
mine which exports intel_fuzzy_clock_check, I will resend this as a series
with the patch doing the exporting as first patch, so that the CI can test
this.

Regards,

Hans


> ---
>   drivers/gpu/drm/i915/intel_dsi_vbt.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> index 022bf59418df..a2a9b9d0eeaa 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> @@ -895,6 +895,17 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
>   		if (mipi_config->target_burst_mode_freq) {
>   			u32 bitrate = intel_dsi_bitrate(intel_dsi);
>   
> +			/*
> +			 * Sometimes the VBT contains a slightly lower clock,
> +			 * then the bitrate we have calculated, in this case
> +			 * just replace it with the calculated bitrate.
> +			 */
> +			if (mipi_config->target_burst_mode_freq < bitrate &&
> +			    intel_fuzzy_clock_check(
> +					mipi_config->target_burst_mode_freq,
> +					bitrate))
> +				mipi_config->target_burst_mode_freq = bitrate;
> +
>   			if (mipi_config->target_burst_mode_freq < bitrate) {
>   				DRM_ERROR("Burst mode freq is less than computed\n");
>   				return false;
> 

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

* Re: [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check
@ 2019-05-24 14:49   ` Hans de Goede
  0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2019-05-24 14:49 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Ville Syrjälä,
	Rodrigo Vivi
  Cc: intel-gfx, stable, dri-devel

Hi,

On 5/24/19 3:06 PM, Hans de Goede wrote:
> Prior to this commit we fail to init the DSI panel on the GPD MicroPC:
> https://www.indiegogo.com/projects/gpd-micropc-6-inch-handheld-industry-laptop#/
> 
> The problem is intel_dsi_vbt_init() failing with the following error:
> *ERROR* Burst mode freq is less than computed
> 
> The pclk in the VBT panel modeline is 70000, together with 24 bpp and
> 4 lines this results in a bitrate value of 70000 * 24 / 4 = 420000.
> But the target_burst_mode_freq in the VBT is 418000.
> 
> This commit works around this problem by adding an intel_fuzzy_clock_check
> when target_burst_mode_freq < bitrate and setting target_burst_mode_freq to
> bitrate when that checks succeeds, fixing the panel not working.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

I just realized that this patch depends on a patch from another series of
mine which exports intel_fuzzy_clock_check, I will resend this as a series
with the patch doing the exporting as first patch, so that the CI can test
this.

Regards,

Hans


> ---
>   drivers/gpu/drm/i915/intel_dsi_vbt.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> index 022bf59418df..a2a9b9d0eeaa 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> @@ -895,6 +895,17 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
>   		if (mipi_config->target_burst_mode_freq) {
>   			u32 bitrate = intel_dsi_bitrate(intel_dsi);
>   
> +			/*
> +			 * Sometimes the VBT contains a slightly lower clock,
> +			 * then the bitrate we have calculated, in this case
> +			 * just replace it with the calculated bitrate.
> +			 */
> +			if (mipi_config->target_burst_mode_freq < bitrate &&
> +			    intel_fuzzy_clock_check(
> +					mipi_config->target_burst_mode_freq,
> +					bitrate))
> +				mipi_config->target_burst_mode_freq = bitrate;
> +
>   			if (mipi_config->target_burst_mode_freq < bitrate) {
>   				DRM_ERROR("Burst mode freq is less than computed\n");
>   				return false;
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check
  2019-05-24 13:06 [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check Hans de Goede
  2019-05-24 13:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2019-05-24 14:49   ` Hans de Goede
@ 2019-05-24 22:10 ` kbuild test robot
  2019-05-24 22:15 ` kbuild test robot
  3 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2019-05-24 22:10 UTC (permalink / raw)
  To: Hans de Goede
  Cc: kbuild-all, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Ville Syrjälä,
	Rodrigo Vivi, intel-gfx, stable, dri-devel

[-- Attachment #1: Type: text/plain, Size: 4890 bytes --]

Hi Hans,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v5.2-rc1 next-20190524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hans-de-Goede/drm-i915-dsi-Use-a-fuzzy-check-for-burst-mode-clock-check/20190525-045136
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x001-201920 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:5:0,
                    from arch/x86/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/gpio/consumer.h:5,
                    from drivers/gpu/drm/i915/intel_dsi_vbt.c:27:
   drivers/gpu/drm/i915/intel_dsi_vbt.c: In function 'intel_dsi_vbt_init':
   drivers/gpu/drm/i915/intel_dsi_vbt.c:867:8: error: implicit declaration of function 'intel_fuzzy_clock_check'; did you mean 'intel_guc_log_create'? [-Werror=implicit-function-declaration]
           intel_fuzzy_clock_check(
           ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_dsi_vbt.c:866:4: note: in expansion of macro 'if'
       if (mipi_config->target_burst_mode_freq < bitrate &&
       ^~
   cc1: some warnings being treated as errors

vim +/if +866 drivers/gpu/drm/i915/intel_dsi_vbt.c

   803	
   804	bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
   805	{
   806		struct drm_device *dev = intel_dsi->base.base.dev;
   807		struct drm_i915_private *dev_priv = to_i915(dev);
   808		struct mipi_config *mipi_config = dev_priv->vbt.dsi.config;
   809		struct mipi_pps_data *pps = dev_priv->vbt.dsi.pps;
   810		struct drm_display_mode *mode = dev_priv->vbt.lfp_lvds_vbt_mode;
   811		u16 burst_mode_ratio;
   812		enum port port;
   813	
   814		DRM_DEBUG_KMS("\n");
   815	
   816		intel_dsi->eotp_pkt = mipi_config->eot_pkt_disabled ? 0 : 1;
   817		intel_dsi->clock_stop = mipi_config->enable_clk_stop ? 1 : 0;
   818		intel_dsi->lane_count = mipi_config->lane_cnt + 1;
   819		intel_dsi->pixel_format =
   820				pixel_format_from_register_bits(
   821					mipi_config->videomode_color_format << 7);
   822	
   823		intel_dsi->dual_link = mipi_config->dual_link;
   824		intel_dsi->pixel_overlap = mipi_config->pixel_overlap;
   825		intel_dsi->operation_mode = mipi_config->is_cmd_mode;
   826		intel_dsi->video_mode_format = mipi_config->video_transfer_mode;
   827		intel_dsi->escape_clk_div = mipi_config->byte_clk_sel;
   828		intel_dsi->lp_rx_timeout = mipi_config->lp_rx_timeout;
   829		intel_dsi->hs_tx_timeout = mipi_config->hs_tx_timeout;
   830		intel_dsi->turn_arnd_val = mipi_config->turn_around_timeout;
   831		intel_dsi->rst_timer_val = mipi_config->device_reset_timer;
   832		intel_dsi->init_count = mipi_config->master_init_timer;
   833		intel_dsi->bw_timer = mipi_config->dbi_bw_timer;
   834		intel_dsi->video_frmt_cfg_bits =
   835			mipi_config->bta_enabled ? DISABLE_VIDEO_BTA : 0;
   836		intel_dsi->bgr_enabled = mipi_config->rgb_flip;
   837	
   838		/* Starting point, adjusted depending on dual link and burst mode */
   839		intel_dsi->pclk = mode->clock;
   840	
   841		/* In dual link mode each port needs half of pixel clock */
   842		if (intel_dsi->dual_link) {
   843			intel_dsi->pclk /= 2;
   844	
   845			/* we can enable pixel_overlap if needed by panel. In this
   846			 * case we need to increase the pixelclock for extra pixels
   847			 */
   848			if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) {
   849				intel_dsi->pclk += DIV_ROUND_UP(mode->vtotal * intel_dsi->pixel_overlap * 60, 1000);
   850			}
   851		}
   852	
   853		/* Burst Mode Ratio
   854		 * Target ddr frequency from VBT / non burst ddr freq
   855		 * multiply by 100 to preserve remainder
   856		 */
   857		if (intel_dsi->video_mode_format == VIDEO_MODE_BURST) {
   858			if (mipi_config->target_burst_mode_freq) {
   859				u32 bitrate = intel_dsi_bitrate(intel_dsi);
   860	
   861				/*
   862				 * Sometimes the VBT contains a slightly lower clock,
   863				 * then the bitrate we have calculated, in this case
   864				 * just replace it with the calculated bitrate.
   865				 */
 > 866				if (mipi_config->target_burst_mode_freq < bitrate &&

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31016 bytes --]

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

* Re: [Intel-gfx] [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check
  2019-05-24 13:06 [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check Hans de Goede
                   ` (2 preceding siblings ...)
  2019-05-24 22:10 ` [Intel-gfx] " kbuild test robot
@ 2019-05-24 22:15 ` kbuild test robot
  3 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2019-05-24 22:15 UTC (permalink / raw)
  To: Hans de Goede
  Cc: kbuild-all, Daniel Vetter, Jani Nikula, Joonas Lahtinen,
	Ville Syrjälä,
	Rodrigo Vivi, intel-gfx, stable, dri-devel

[-- Attachment #1: Type: text/plain, Size: 3941 bytes --]

Hi Hans,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v5.2-rc1 next-20190524]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hans-de-Goede/drm-i915-dsi-Use-a-fuzzy-check-for-burst-mode-clock-check/20190525-045136
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):


vim +867 drivers/gpu/drm/i915/intel_dsi_vbt.c

   803	
   804	bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
   805	{
   806		struct drm_device *dev = intel_dsi->base.base.dev;
   807		struct drm_i915_private *dev_priv = to_i915(dev);
   808		struct mipi_config *mipi_config = dev_priv->vbt.dsi.config;
   809		struct mipi_pps_data *pps = dev_priv->vbt.dsi.pps;
   810		struct drm_display_mode *mode = dev_priv->vbt.lfp_lvds_vbt_mode;
   811		u16 burst_mode_ratio;
   812		enum port port;
   813	
   814		DRM_DEBUG_KMS("\n");
   815	
   816		intel_dsi->eotp_pkt = mipi_config->eot_pkt_disabled ? 0 : 1;
   817		intel_dsi->clock_stop = mipi_config->enable_clk_stop ? 1 : 0;
   818		intel_dsi->lane_count = mipi_config->lane_cnt + 1;
   819		intel_dsi->pixel_format =
   820				pixel_format_from_register_bits(
   821					mipi_config->videomode_color_format << 7);
   822	
   823		intel_dsi->dual_link = mipi_config->dual_link;
   824		intel_dsi->pixel_overlap = mipi_config->pixel_overlap;
   825		intel_dsi->operation_mode = mipi_config->is_cmd_mode;
   826		intel_dsi->video_mode_format = mipi_config->video_transfer_mode;
   827		intel_dsi->escape_clk_div = mipi_config->byte_clk_sel;
   828		intel_dsi->lp_rx_timeout = mipi_config->lp_rx_timeout;
   829		intel_dsi->hs_tx_timeout = mipi_config->hs_tx_timeout;
   830		intel_dsi->turn_arnd_val = mipi_config->turn_around_timeout;
   831		intel_dsi->rst_timer_val = mipi_config->device_reset_timer;
   832		intel_dsi->init_count = mipi_config->master_init_timer;
   833		intel_dsi->bw_timer = mipi_config->dbi_bw_timer;
   834		intel_dsi->video_frmt_cfg_bits =
   835			mipi_config->bta_enabled ? DISABLE_VIDEO_BTA : 0;
   836		intel_dsi->bgr_enabled = mipi_config->rgb_flip;
   837	
   838		/* Starting point, adjusted depending on dual link and burst mode */
   839		intel_dsi->pclk = mode->clock;
   840	
   841		/* In dual link mode each port needs half of pixel clock */
   842		if (intel_dsi->dual_link) {
   843			intel_dsi->pclk /= 2;
   844	
   845			/* we can enable pixel_overlap if needed by panel. In this
   846			 * case we need to increase the pixelclock for extra pixels
   847			 */
   848			if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) {
   849				intel_dsi->pclk += DIV_ROUND_UP(mode->vtotal * intel_dsi->pixel_overlap * 60, 1000);
   850			}
   851		}
   852	
   853		/* Burst Mode Ratio
   854		 * Target ddr frequency from VBT / non burst ddr freq
   855		 * multiply by 100 to preserve remainder
   856		 */
   857		if (intel_dsi->video_mode_format == VIDEO_MODE_BURST) {
   858			if (mipi_config->target_burst_mode_freq) {
   859				u32 bitrate = intel_dsi_bitrate(intel_dsi);
   860	
   861				/*
   862				 * Sometimes the VBT contains a slightly lower clock,
   863				 * then the bitrate we have calculated, in this case
   864				 * just replace it with the calculated bitrate.
   865				 */
   866				if (mipi_config->target_burst_mode_freq < bitrate &&
 > 867				    intel_fuzzy_clock_check(

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66458 bytes --]

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

end of thread, other threads:[~2019-05-24 22:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 13:06 [PATCH] drm/i915/dsi: Use a fuzzy check for burst mode clock check Hans de Goede
2019-05-24 13:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-05-24 14:49 ` [PATCH] " Hans de Goede
2019-05-24 14:49   ` Hans de Goede
2019-05-24 22:10 ` [Intel-gfx] " kbuild test robot
2019-05-24 22:15 ` kbuild test robot

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.