public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2022-11-15 23:47 Stephen Rothwell
  2022-11-16  0:25 ` Stephen Rothwell
  0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2022-11-15 23:47 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI
  Cc: Christian König, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

between commit:

  eca13f3c67b6 ("drm/amdgpu: use the last IB as gang leader v2")

from the drm-misc-fixes tree and commit:

  1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de5cb056c9ad,0528c2b1db6e..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@@ -1197,10 -1201,7 +1203,10 @@@ static int amdgpu_cs_sync_rings(struct 
  	}
  
  	for (i = 0; i < p->gang_size; ++i) {
 +		if (p->jobs[i] == leader)
 +			continue;
 +
- 		r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
+ 		r = amdgpu_sync_push_to_job(&p->sync, p->jobs[i]);
  		if (r)
  			return r;
  	}
@@@ -1241,14 -1243,11 +1247,14 @@@ static int amdgpu_cs_submit(struct amdg
  	for (i = 0; i < p->gang_size; ++i)
  		drm_sched_job_arm(&p->jobs[i]->base);
  
 -	for (i = 0; i < (p->gang_size - 1); ++i) {
 +	for (i = 0; i < p->gang_size; ++i) {
  		struct dma_fence *fence;
  
 +		if (p->jobs[i] == leader)
 +			continue;
 +
  		fence = &p->jobs[i]->base.s_fence->scheduled;
- 		r = amdgpu_sync_fence(&leader->sync, fence);
+ 		r = drm_sched_job_add_dependency(&leader->base, fence);
  		if (r)
  			goto error_cleanup;
  	}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2025-06-11  2:08 Stephen Rothwell
  2025-06-11  2:22 ` Stephen Rothwell
  0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2025-06-11  2:08 UTC (permalink / raw)
  To: Simona Vetter
  Cc: Intel Graphics, DRI, Dmitry Baryshkov, Dmitry Baryshkov,
	Gabriel Dalimonte, Linux Kernel Mailing List,
	Linux Next Mailing List, Maxime Ripard

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/vc4/vc4_hdmi.c

between commit:

  c0317ad44f45 ("drm/vc4: fix infinite EPROBE_DEFER loop")

from the drm-misc-fixes tree and commit:

  d9f9bae6752f ("drm/bridge: allow limiting I2S formats")

from the drm-misc tree.

I fixed it up (the former removes code updated by the latter, so I just
removed the code) and can carry the fix as necessary. This is now fixed
as far as linux-next is concerned, but any non trivial conflicts should
be mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2025-04-09  0:46 Stephen Rothwell
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Rothwell @ 2025-04-09  0:46 UTC (permalink / raw)
  To: Simona Vetter
  Cc: Intel Graphics, DRI, Linux Kernel Mailing List,
	Linux Next Mailing List, Maxime Ripard

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  include/drm/drm_kunit_helpers.h

between commit:

  13c1d5f3a7fa ("drm/tests: helpers: Create kunit helper to destroy a drm_display_mode")

from the drm-misc-fixes tree and commit:

  e4e3de631d14 ("drm/tests: helpers: Create new helper to enable output")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/drm/drm_kunit_helpers.h
index 1c62d1d4458c,1cda7281f300..000000000000
--- a/include/drm/drm_kunit_helpers.h
+++ b/include/drm/drm_kunit_helpers.h
@@@ -118,9 -119,13 +119,16 @@@ drm_kunit_helper_create_crtc(struct kun
  			     const struct drm_crtc_funcs *funcs,
  			     const struct drm_crtc_helper_funcs *helper_funcs);
  
+ int drm_kunit_helper_enable_crtc_connector(struct kunit *test,
+ 					   struct drm_device *drm,
+ 					   struct drm_crtc *crtc,
+ 					   struct drm_connector *connector,
+ 					   const struct drm_display_mode *mode,
+ 					   struct drm_modeset_acquire_ctx *ctx);
+ 
 +int drm_kunit_add_mode_destroy_action(struct kunit *test,
 +				      struct drm_display_mode *mode);
 +
  struct drm_display_mode *
  drm_kunit_display_mode_from_cea_vic(struct kunit *test, struct drm_device *dev,
  				    u8 video_code);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2024-10-03  1:04 Stephen Rothwell
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Rothwell @ 2024-10-03  1:04 UTC (permalink / raw)
  To: Simona Vetter
  Cc: Adrián Larumbe, Boris Brezillon, Intel Graphics, DRI,
	Linux Kernel Mailing List, Linux Next Mailing List, Liviu Dudau

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/panthor/panthor_drv.c

between commit:

  2b55639a4e25 ("drm/panthor: Add FOP_UNSIGNED_OFFSET to fop_flags")

from the drm-misc-fixes tree and commit:

  e16635d88fa0 ("drm/panthor: add DRM fdinfo support")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/panthor/panthor_drv.c
index c520f156e2d7,f9b93f84d611..000000000000
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@@ -1383,7 -1476,7 +1476,8 @@@ static const struct file_operations pan
  	.read = drm_read,
  	.llseek = noop_llseek,
  	.mmap = panthor_mmap,
 +	.fop_flags = FOP_UNSIGNED_OFFSET,
+ 	.show_fdinfo = drm_show_fdinfo,
  };
  
  #ifdef CONFIG_DEBUG_FS

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2024-08-01  1:18 Stephen Rothwell
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Rothwell @ 2024-08-01  1:18 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics, DRI, Linux Kernel Mailing List,
	Linux Next Mailing List, Thomas Zimmermann

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/ast/ast_drv.h

between commit:

  0ce91928ec62 ("drm/ast: astdp: Wake up during connector status detection")

from the drm-misc-fixes tree and commit:

  c91d75a3c6a2 ("drm/ast: astdp: Test firmware status once during probing")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/ast/ast_drv.h
index 47bab5596c16,b54a89676e9f..000000000000
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@@ -471,9 -471,9 +471,10 @@@ void ast_init_3rdtx(struct drm_device *
  /* aspeed DP */
  bool ast_astdp_is_connected(struct ast_device *ast);
  int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata);
- void ast_dp_launch(struct drm_device *dev);
+ int ast_dp_launch(struct ast_device *ast);
 +bool ast_dp_power_is_on(struct ast_device *ast);
  void ast_dp_power_on_off(struct drm_device *dev, bool no);
+ void ast_dp_link_training(struct ast_device *ast);
  void ast_dp_set_on_off(struct drm_device *dev, bool no);
  void ast_dp_set_mode(struct drm_crtc *crtc, struct ast_vbios_mode_info *vbios_mode);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2023-01-27  2:28 Stephen Rothwell
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Rothwell @ 2023-01-27  2:28 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics, DRI, Javier Martinez Canillas,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Thomas Zimmermann

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_fbdev_generic.c

between commits:

  cc88ad784e42 ("drm/fb-helper: Check fb_deferred_io_init() return value")
  d6591da5f3ff ("drm/fb-helper: Use a per-driver FB deferred I/O handler")

from the drm-misc-fixes tree and commit:

  6ca80b9e5cc0 ("drm/fbdev-generic: Rename struct fb_info 'fbi' to 'info'")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/drm_fbdev_generic.c
index bd1f8f28297c,43f94aa9e015..000000000000
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@@ -200,31 -189,25 +184,31 @@@ static int drm_fbdev_fb_probe(struct dr
  	fb_helper->fb = buffer->fb;
  	fb = buffer->fb;
  
- 	fbi = drm_fb_helper_alloc_info(fb_helper);
- 	if (IS_ERR(fbi))
- 		return PTR_ERR(fbi);
+ 	info = drm_fb_helper_alloc_info(fb_helper);
+ 	if (IS_ERR(info))
+ 		return PTR_ERR(info);
  
- 	fbi->fbops = &drm_fbdev_fb_ops;
- 	fbi->screen_size = sizes->surface_height * fb->pitches[0];
- 	fbi->fix.smem_len = fbi->screen_size;
- 	fbi->flags = FBINFO_DEFAULT;
+ 	info->fbops = &drm_fbdev_fb_ops;
+ 	info->screen_size = sizes->surface_height * fb->pitches[0];
+ 	info->fix.smem_len = info->screen_size;
+ 	info->flags = FBINFO_DEFAULT;
  
- 	drm_fb_helper_fill_info(fbi, fb_helper, sizes);
+ 	drm_fb_helper_fill_info(info, fb_helper, sizes);
  
  	if (drm_fbdev_use_shadow_fb(fb_helper)) {
- 		fbi->screen_buffer = vzalloc(fbi->screen_size);
- 		if (!fbi->screen_buffer)
+ 		info->screen_buffer = vzalloc(info->screen_size);
+ 		if (!info->screen_buffer)
  			return -ENOMEM;
- 		fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
+ 		info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
  
 -		info->fbdefio = &drm_fbdev_defio;
 -		fb_deferred_io_init(info);
 +		/* Set a default deferred I/O handler */
 +		fb_helper->fbdefio.delay = HZ / 20;
 +		fb_helper->fbdefio.deferred_io = drm_fb_helper_deferred_io;
 +
- 		fbi->fbdefio = &fb_helper->fbdefio;
- 		ret = fb_deferred_io_init(fbi);
++		info->fbdefio = &fb_helper->fbdefio;
++		ret = fb_deferred_io_init(info);
 +		if (ret)
 +			return ret;
  	} else {
  		/* buffer is mapped for HW framebuffer */
  		ret = drm_client_buffer_vmap(fb_helper->buffer, &map);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2022-04-13 23:47 Stephen Rothwell
  2022-04-14  6:33 ` Christian König
  2022-04-26  1:48 ` Stephen Rothwell
  0 siblings, 2 replies; 19+ messages in thread
From: Stephen Rothwell @ 2022-04-13 23:47 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI
  Cc: Christian König, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/radeon/radeon_sync.c

between commit:

  022074918042 ("drm/radeon: fix logic inversion in radeon_sync_resv")

from the drm-misc-fixes tree and commit:

  7bc80a5462c3 ("dma-buf: add enum dma_resv_usage v4")

from the drm-misc tree.

I fixed it up (I just used the latter version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2020-10-29  1:18 Stephen Rothwell
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Rothwell @ 2020-10-29  1:18 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI
  Cc: Daniel Vetter, Linux Kernel Mailing List, Linux Next Mailing List,
	Thomas Zimmermann

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_gem.c

between commit:

  f49a51bfdc8e ("drm/shme-helpers: Fix dma_buf_mmap forwarding bug")

from the drm-misc-fixes tree and commit:

  d693def4fd1c ("drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/drm_gem.c
index 69c2c079d803,1da67d34e55d..000000000000
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@@ -1085,9 -1076,7 +1076,9 @@@ int drm_gem_mmap_obj(struct drm_gem_obj
  	 */
  	drm_gem_object_get(obj);
  
 +	vma->vm_private_data = obj;
 +
- 	if (obj->funcs && obj->funcs->mmap) {
+ 	if (obj->funcs->mmap) {
  		ret = obj->funcs->mmap(obj, vma);
  		if (ret) {
  			drm_gem_object_put(obj);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2020-04-21  1:52 Stephen Rothwell
  2020-04-21  6:10 ` Tomi Valkeinen
  0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2020-04-21  1:52 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Tomi Valkeinen, Thomas Zimmermann

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

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:he drm-misc tree with the drm-misc-fixes tree

  drivers/gpu/drm/tidss/tidss_encoder.c

between commit:

  9da67433f64e ("drm/tidss: fix crash related to accessing freed memory")

from the drm-misc-fixes tree and commit:

  b28ad7deb2f2 ("drm/tidss: Use simple encoder")

from the drm-misc tree.

I fixed it up (I just used the latter version of this file) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread
* linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree
@ 2017-07-18  1:39 Stephen Rothwell
  2017-07-21  0:03 ` Stephen Rothwell
  0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2017-07-18  1:39 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Boris Brezillon, Eric Anholt, Laurent Pinchart

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/vc4/vc4_crtc.c

between commit:

  1ed134e6526b ("drm/vc4: Fix VBLANK handling in crtc->enable() path")

from the drm-misc-fixes tree and commit:

  0b20a0f8c3cb ("drm: Add old state pointer to CRTC .enable() helper function")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/vc4/vc4_crtc.c
index a12cc7ea99b6,9e0c1500375c..000000000000
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@@ -518,37 -519,23 +519,51 @@@ static void vc4_crtc_atomic_disable(str
  	WARN_ON_ONCE((HVS_READ(SCALER_DISPSTATX(chan)) &
  		      (SCALER_DISPSTATX_FULL | SCALER_DISPSTATX_EMPTY)) !=
  		     SCALER_DISPSTATX_EMPTY);
+ 
+ 	/*
+ 	 * Make sure we issue a vblank event after disabling the CRTC if
+ 	 * someone was waiting it.
+ 	 */
+ 	if (crtc->state->event) {
+ 		unsigned long flags;
+ 
+ 		spin_lock_irqsave(&dev->event_lock, flags);
+ 		drm_crtc_send_vblank_event(crtc, crtc->state->event);
+ 		crtc->state->event = NULL;
+ 		spin_unlock_irqrestore(&dev->event_lock, flags);
+ 	}
  }
  
 +static void vc4_crtc_update_dlist(struct drm_crtc *crtc)
 +{
 +	struct drm_device *dev = crtc->dev;
 +	struct vc4_dev *vc4 = to_vc4_dev(dev);
 +	struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
 +	struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state);
 +
 +	if (crtc->state->event) {
 +		unsigned long flags;
 +
 +		crtc->state->event->pipe = drm_crtc_index(crtc);
 +
 +		WARN_ON(drm_crtc_vblank_get(crtc) != 0);
 +
 +		spin_lock_irqsave(&dev->event_lock, flags);
 +		vc4_crtc->event = crtc->state->event;
 +		crtc->state->event = NULL;
 +
 +		HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel),
 +			  vc4_state->mm.start);
 +
 +		spin_unlock_irqrestore(&dev->event_lock, flags);
 +	} else {
 +		HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel),
 +			  vc4_state->mm.start);
 +	}
 +}
 +
- static void vc4_crtc_enable(struct drm_crtc *crtc)
+ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc,
+ 				   struct drm_crtc_state *old_state)
  {
  	struct drm_device *dev = crtc->dev;
  	struct vc4_dev *vc4 = to_vc4_dev(dev);
@@@ -575,20 -556,22 +590,19 @@@
  	/* Turn on the pixel valve, which will emit the vstart signal. */
  	CRTC_WRITE(PV_V_CONTROL,
  		   CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN);
 -
 -	/* Enable vblank irq handling after crtc is started. */
 -	drm_crtc_vblank_on(crtc);
  }
  
- static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc,
- 				const struct drm_display_mode *mode,
- 				struct drm_display_mode *adjusted_mode)
+ static enum drm_mode_status vc4_crtc_mode_valid(struct drm_crtc *crtc,
+ 						const struct drm_display_mode *mode)
  {
  	/* Do not allow doublescan modes from user space */
- 	if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) {
+ 	if (mode->flags & DRM_MODE_FLAG_DBLSCAN) {
  		DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n",
  			      crtc->base.id);
- 		return false;
+ 		return MODE_NO_DBLESCAN;
  	}
  
- 	return true;
+ 	return MODE_OK;
  }
  
  static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
@@@ -650,15 -634,25 +664,15 @@@ static void vc4_crtc_atomic_flush(struc
  
  	WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm.size);
  
 -	if (crtc->state->event) {
 -		unsigned long flags;
 -
 -		crtc->state->event->pipe = drm_crtc_index(crtc);
 -
 -		WARN_ON(drm_crtc_vblank_get(crtc) != 0);
 -
 -		spin_lock_irqsave(&dev->event_lock, flags);
 -		vc4_crtc->event = crtc->state->event;
 -		crtc->state->event = NULL;
 -
 -		HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel),
 -			  vc4_state->mm.start);
 -
 -		spin_unlock_irqrestore(&dev->event_lock, flags);
 -	} else {
 -		HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel),
 -			  vc4_state->mm.start);
 -	}
 +	/* Only update DISPLIST if the CRTC was already running and is not
 +	 * being disabled.
- 	 * vc4_crtc_enable() takes care of updating the dlist just after
++	 * vc4_crtc_atomic_enable() takes care of updating the dlist just after
 +	 * re-enabling VBLANK interrupts and before enabling the engine.
 +	 * If the CRTC is being disabled, there's no point in updating this
 +	 * information.
 +	 */
 +	if (crtc->state->active && old_state->active)
 +		vc4_crtc_update_dlist(crtc);
  
  	if (debug_dump_regs) {
  		DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc));

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

end of thread, other threads:[~2025-06-11  2:22 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 23:47 linux-next: manual merge of the drm-misc tree with the drm-misc-fixes tree Stephen Rothwell
2022-11-16  0:25 ` Stephen Rothwell
2022-11-16 12:13   ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2025-06-11  2:08 Stephen Rothwell
2025-06-11  2:22 ` Stephen Rothwell
2025-04-09  0:46 Stephen Rothwell
2024-10-03  1:04 Stephen Rothwell
2024-08-01  1:18 Stephen Rothwell
2023-01-27  2:28 Stephen Rothwell
2022-04-13 23:47 Stephen Rothwell
2022-04-14  6:33 ` Christian König
2022-04-26  1:48 ` Stephen Rothwell
2020-10-29  1:18 Stephen Rothwell
2020-04-21  1:52 Stephen Rothwell
2020-04-21  6:10 ` Tomi Valkeinen
2020-04-23  3:17   ` Stephen Rothwell
2020-05-15 11:32     ` Tomi Valkeinen
2017-07-18  1:39 Stephen Rothwell
2017-07-21  0:03 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox