mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2019-08-26  3:06 Stephen Rothwell
  2019-08-29 10:11 ` james qian wang (Arm Technology China)
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2019-08-26  3:06 UTC (permalink / raw)
  To: Dave Airlie, DRI, Daniel Vetter, Intel Graphics
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Mihail Atanassov, Ayan kumar halder,
	James Qian Wang (Arm Technology China),
	Liviu Dudau

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

Hi all,

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

  drivers/gpu/drm/arm/display/komeda/komeda_dev.c

between commit:

  51a44a28eefd ("drm/komeda: Add missing of_node_get() call")

from the drm-misc-fixes tree and commit:

  8965ad8433ea ("drm/komeda: Enable dual-link support")

from the drm 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/arm/display/komeda/komeda_dev.c
index 9d4d5075cc64,1ff7f4b2c620..000000000000
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c
@@@ -127,7 -128,8 +129,8 @@@ static int komeda_parse_pipe_dt(struct 
  	pipe->of_output_port =
  		of_graph_get_port_by_id(np, KOMEDA_OF_PORT_OUTPUT);
  
+ 	pipe->dual_link = pipe->of_output_links[0] && pipe->of_output_links[1];
 -	pipe->of_node = np;
 +	pipe->of_node = of_node_get(np);
  
  	return 0;
  }

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-10-19 16:10 Mark Brown
  2026-10-19 19:09 ` Devin Wittmayer
  2026-10-20  7:30 ` Jocelyn Falempe
  0 siblings, 2 replies; 62+ messages in thread
From: Mark Brown @ 2026-10-19 16:10 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Devin Wittmayer, Intel Graphics, Jocelyn Falempe,
	Linux Kernel Mailing List, Linux Next Mailing List, luyuantao,
	Simona Vetter, Thomas Zimmermann

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

Hi all,

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

  drivers/gpu/drm/drm_panic.c

between commits:

  1ba6405638439 ("drm/panic: Fix kmsg screen hang on a long log line")
  b537d87d2632c ("drm/panic: Fix the loop that causes kmsg to not display correctly")
  3706caf4da279 ("drm/panic: Accept a trailing newline in panic_screen")

from the drm-misc-fixes tree and commit:

  5c3d323984fd1 ("drm/panic: Move panic display code into helper library")

from the drm tree.  This obviously isn't the right merge, it drops the
fixes.

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.

diff --combined drivers/gpu/drm/drm_panic.c
index 5109bfd5d8891,9fe97c4eda6c8..0000000000000
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@@ -7,33 -7,23 +7,23 @@@
   */
  
  #include <linux/export.h>
- #include <linux/font.h>
- #include <linux/highmem.h>
  #include <linux/init.h>
- #include <linux/iosys-map.h>
  #include <linux/kdebug.h>
  #include <linux/kmsg_dump.h>
- #include <linux/linux_logo.h>
  #include <linux/list.h>
  #include <linux/math.h>
  #include <linux/module.h>
  #include <linux/overflow.h>
  #include <linux/printk.h>
  #include <linux/types.h>
- #include <linux/utsname.h>
- #include <linux/zlib.h>
  
  #include <drm/drm_drv.h>
- #include <drm/drm_fourcc.h>
- #include <drm/drm_framebuffer.h>
- #include <drm/drm_modeset_helper_vtables.h>
  #include <drm/drm_panic.h>
  #include <drm/drm_plane.h>
  #include <drm/drm_print.h>
- #include <drm/drm_rect.h>
  
  #include "drm_crtc_internal.h"
- #include "drm_draw_internal.h"
+ #include "drm_panic_internal.h"
  
  MODULE_AUTHOR("Jocelyn Falempe");
  MODULE_DESCRIPTION("DRM panic handler");
@@@ -42,789 -32,25 +32,25 @@@ MODULE_LICENSE("GPL")
  /**
   * DOC: overview
   *
-  * To enable DRM panic for a driver, the primary plane must implement a
-  * &drm_plane_helper_funcs.get_scanout_buffer helper function. It is then
-  * automatically registered to the drm panic handler.
-  * When a panic occurs, the &drm_plane_helper_funcs.get_scanout_buffer will be
-  * called, and the driver can provide a framebuffer so the panic handler can
-  * draw the panic screen on it. Currently only linear buffer and a few color
-  * formats are supported.
-  * Optionally the driver can also provide a &drm_plane_helper_funcs.panic_flush
-  * callback, that will be called after that, to send additional commands to the
-  * hardware to make the scanout buffer visible.
-  */
- 
- /*
-  * This module displays a user friendly message on screen when a kernel panic
-  * occurs. This is conflicting with fbcon, so you can only enable it when fbcon
-  * is disabled.
-  * It's intended for end-user, so have minimal technical/debug information.
+  * This module displays a user friendly message on screen when a kernel
+  * panic occurs. It's intended for end users and therefore have minimal
+  * technical/debug information.
   *
-  * Implementation details:
+  * To enable DRM panic for a driver, the at least one primary plane must
+  * implement struct &drm_plane_funcs.display_panic_screen. The plane is
+  * then automatically registered to the drm panic handler.
   *
-  * It is a panic handler, so it can't take lock, allocate memory, run tasks/irq,
-  * or attempt to sleep. It's a best effort, and it may not be able to display
-  * the message in all situations (like if the panic occurs in the middle of a
-  * modesetting).
-  * It will display only one static frame, so performance optimizations are low
-  * priority as the machine is already in an unusable state.
+  * When a panic occurs, the DRM panic handler calls struct
+  * &drm_plane_funcs.display_panic_screen. See
+  * drm_plane_helper_display_panic_screen() for a generic implementation.
   */
  
- struct drm_panic_line {
- 	u32 len;
- 	const char *txt;
- };
- 
- #define PANIC_LINE(s) {.len = sizeof(s) - 1, .txt = s}
- 
- static struct drm_panic_line panic_msg[] = {
- 	PANIC_LINE("KERNEL PANIC!"),
- 	PANIC_LINE(""),
- 	PANIC_LINE("Please reboot your computer."),
- 	PANIC_LINE(""),
- 	PANIC_LINE(""), /* will be replaced by the panic description */
- };
- 
- static const size_t panic_msg_lines = ARRAY_SIZE(panic_msg);
- 
- static const struct drm_panic_line logo_ascii[] = {
- 	PANIC_LINE("     .--.        _"),
- 	PANIC_LINE("    |o_o |      | |"),
- 	PANIC_LINE("    |:_/ |      | |"),
- 	PANIC_LINE("   //   \\ \\     |_|"),
- 	PANIC_LINE("  (|     | )     _"),
- 	PANIC_LINE(" /'\\_   _/`\\    (_)"),
- 	PANIC_LINE(" \\___)=(___/"),
- };
- 
- static const size_t logo_ascii_lines = ARRAY_SIZE(logo_ascii);
- 
- #if defined(CONFIG_LOGO) && !defined(MODULE)
- static const struct linux_logo *logo_mono;
- 
- static int drm_panic_setup_logo(void)
- {
- 	const struct linux_logo *logo = fb_find_logo(1);
- 	const unsigned char *logo_data;
- 	struct linux_logo *logo_dup;
- 
- 	if (!logo || logo->type != LINUX_LOGO_MONO)
- 		return 0;
- 
- 	/* The logo is __init, so we must make a copy for later use */
- 	logo_data = kmemdup(logo->data,
- 			    size_mul(DIV_ROUND_UP(logo->width, BITS_PER_BYTE), logo->height),
- 			    GFP_KERNEL);
- 	if (!logo_data)
- 		return -ENOMEM;
- 
- 	logo_dup = kmemdup(logo, sizeof(*logo), GFP_KERNEL);
- 	if (!logo_dup) {
- 		kfree(logo_data);
- 		return -ENOMEM;
- 	}
- 
- 	logo_dup->data = logo_data;
- 	logo_mono = logo_dup;
- 
- 	return 0;
- }
- 
- device_initcall(drm_panic_setup_logo);
- #else
- #define logo_mono	((const struct linux_logo *)NULL)
- #endif
- 
- /*
-  *  Blit & Fill functions
-  */
- static void drm_panic_blit_pixel(struct drm_scanout_buffer *sb, struct drm_rect *clip,
- 				 const u8 *sbuf8, unsigned int spitch, unsigned int scale,
- 				 u32 fg_color)
- {
- 	unsigned int y, x;
- 
- 	for (y = 0; y < drm_rect_height(clip); y++)
- 		for (x = 0; x < drm_rect_width(clip); x++)
- 			if (drm_draw_is_pixel_fg(sbuf8, spitch, x / scale, y / scale))
- 				sb->set_pixel(sb, clip->x1 + x, clip->y1 + y, fg_color);
- }
- 
- static void drm_panic_write_pixel16(void *vaddr, unsigned int offset, u16 color)
- {
- 	u16 *p = vaddr + offset;
- 
- 	*p = color;
- }
- 
- static void drm_panic_write_pixel24(void *vaddr, unsigned int offset, u32 color)
- {
- 	u8 *p = vaddr + offset;
- 
- 	*p++ = color & 0xff;
- 	color >>= 8;
- 	*p++ = color & 0xff;
- 	color >>= 8;
- 	*p = color & 0xff;
- }
- 
- /*
-  * Special case if the pixel crosses page boundaries
-  */
- static void drm_panic_write_pixel24_xpage(void *vaddr, struct page *next_page,
- 					  unsigned int offset, u32 color)
- {
- 	u8 *vaddr2;
- 	u8 *p = vaddr + offset;
- 
- 	vaddr2 = kmap_local_page_try_from_panic(next_page);
- 
- 	*p++ = color & 0xff;
- 	color >>= 8;
- 
- 	if (offset == PAGE_SIZE - 1)
- 		p = vaddr2;
- 
- 	*p++ = color & 0xff;
- 	color >>= 8;
- 
- 	if (offset == PAGE_SIZE - 2)
- 		p = vaddr2;
- 
- 	*p = color & 0xff;
- 	kunmap_local(vaddr2);
- }
- 
- static void drm_panic_write_pixel32(void *vaddr, unsigned int offset, u32 color)
- {
- 	u32 *p = vaddr + offset;
- 
- 	*p = color;
- }
- 
- static void drm_panic_write_pixel(void *vaddr, unsigned int offset, u32 color, unsigned int cpp)
- {
- 	switch (cpp) {
- 	case 2:
- 		drm_panic_write_pixel16(vaddr, offset, color);
- 		break;
- 	case 3:
- 		drm_panic_write_pixel24(vaddr, offset, color);
- 		break;
- 	case 4:
- 		drm_panic_write_pixel32(vaddr, offset, color);
- 		break;
- 	default:
- 		pr_debug_once("Can't blit with pixel width %d\n", cpp);
- 	}
- }
- 
- /*
-  * The scanout buffer pages are not mapped, so for each pixel,
-  * use kmap_local_page_try_from_panic() to map the page, and write the pixel.
-  * Try to keep the map from the previous pixel, to avoid too much map/unmap.
-  */
- static void drm_panic_blit_page(struct page **pages, unsigned int dpitch,
- 				unsigned int cpp, const u8 *sbuf8,
- 				unsigned int spitch, struct drm_rect *clip,
- 				unsigned int scale, u32 fg32)
- {
- 	unsigned int y, x;
- 	unsigned int page = ~0;
- 	unsigned int height = drm_rect_height(clip);
- 	unsigned int width = drm_rect_width(clip);
- 	void *vaddr = NULL;
- 
- 	for (y = 0; y < height; y++) {
- 		for (x = 0; x < width; x++) {
- 			if (drm_draw_is_pixel_fg(sbuf8, spitch, x / scale, y / scale)) {
- 				unsigned int new_page;
- 				unsigned int offset;
- 
- 				offset = (y + clip->y1) * dpitch + (x + clip->x1) * cpp;
- 				new_page = offset >> PAGE_SHIFT;
- 				offset = offset % PAGE_SIZE;
- 				if (new_page != page) {
- 					if (!pages[new_page])
- 						continue;
- 					if (vaddr)
- 						kunmap_local(vaddr);
- 					page = new_page;
- 					vaddr = kmap_local_page_try_from_panic(pages[page]);
- 				}
- 				if (!vaddr)
- 					continue;
- 
- 				// Special case for 24bit, as a pixel might cross page boundaries
- 				if (cpp == 3 && offset + 3 > PAGE_SIZE)
- 					drm_panic_write_pixel24_xpage(vaddr, pages[page + 1],
- 								      offset, fg32);
- 				else
- 					drm_panic_write_pixel(vaddr, offset, fg32, cpp);
- 			}
- 		}
- 	}
- 	if (vaddr)
- 		kunmap_local(vaddr);
- }
- 
- /*
-  * drm_panic_blit - convert a monochrome image to a linear framebuffer
-  * @sb: destination scanout buffer
-  * @clip: destination rectangle
-  * @sbuf8: source buffer, in monochrome format, 8 pixels per byte.
-  * @spitch: source pitch in bytes
-  * @scale: integer scale, source buffer is scale time smaller than destination
-  *         rectangle
-  * @fg_color: foreground color, in destination format
-  *
-  * This can be used to draw a font character, which is a monochrome image, to a
-  * framebuffer in other supported format.
-  */
- static void drm_panic_blit(struct drm_scanout_buffer *sb, struct drm_rect *clip,
- 			   const u8 *sbuf8, unsigned int spitch,
- 			   unsigned int scale, u32 fg_color)
- 
- {
- 	struct iosys_map map;
- 
- 	if (sb->set_pixel)
- 		return drm_panic_blit_pixel(sb, clip, sbuf8, spitch, scale, fg_color);
- 
- 	if (sb->pages)
- 		return drm_panic_blit_page(sb->pages, sb->pitch[0], sb->format->cpp[0],
- 					   sbuf8, spitch, clip, scale, fg_color);
- 
- 	map = sb->map[0];
- 	iosys_map_incr(&map, clip->y1 * sb->pitch[0] + clip->x1 * sb->format->cpp[0]);
- 
- 	switch (sb->format->cpp[0]) {
- 	case 2:
- 		drm_draw_blit16(&map, sb->pitch[0], sbuf8, spitch,
- 				drm_rect_height(clip), drm_rect_width(clip), scale, fg_color);
- 	break;
- 	case 3:
- 		drm_draw_blit24(&map, sb->pitch[0], sbuf8, spitch,
- 				drm_rect_height(clip), drm_rect_width(clip), scale, fg_color);
- 	break;
- 	case 4:
- 		drm_draw_blit32(&map, sb->pitch[0], sbuf8, spitch,
- 				drm_rect_height(clip), drm_rect_width(clip), scale, fg_color);
- 	break;
- 	default:
- 		WARN_ONCE(1, "Can't blit with pixel width %d\n", sb->format->cpp[0]);
- 	}
- }
- 
- static void drm_panic_fill_pixel(struct drm_scanout_buffer *sb,
- 				 struct drm_rect *clip,
- 				 u32 color)
- {
- 	unsigned int y, x;
- 
- 	for (y = 0; y < drm_rect_height(clip); y++)
- 		for (x = 0; x < drm_rect_width(clip); x++)
- 			sb->set_pixel(sb, clip->x1 + x, clip->y1 + y, color);
- }
- 
- static void drm_panic_fill_page(struct page **pages, unsigned int dpitch,
- 				unsigned int cpp, struct drm_rect *clip,
- 				u32 color)
- {
- 	unsigned int y, x;
- 	unsigned int page = ~0;
- 	void *vaddr = NULL;
- 
- 	for (y = clip->y1; y < clip->y2; y++) {
- 		for (x = clip->x1; x < clip->x2; x++) {
- 			unsigned int new_page;
- 			unsigned int offset;
- 
- 			offset = y * dpitch + x * cpp;
- 			new_page = offset >> PAGE_SHIFT;
- 			offset = offset % PAGE_SIZE;
- 			if (new_page != page) {
- 				if (vaddr)
- 					kunmap_local(vaddr);
- 				page = new_page;
- 				vaddr = kmap_local_page_try_from_panic(pages[page]);
- 			}
- 			if (!vaddr)
- 				continue;
- 
- 			// Special case for 24bit, as a pixel might cross page boundaries
- 			if (cpp == 3 && offset + 3 > PAGE_SIZE)
- 				drm_panic_write_pixel24_xpage(vaddr, pages[page + 1],
- 							      offset, color);
- 			else
- 				drm_panic_write_pixel(vaddr, offset, color, cpp);
- 		}
- 	}
- 	if (vaddr)
- 		kunmap_local(vaddr);
- }
- 
- /*
-  * drm_panic_fill - Fill a rectangle with a color
-  * @sb: destination scanout buffer
-  * @clip: destination rectangle
-  * @color: foreground color, in destination format
-  *
-  * Fill a rectangle with a color, in a linear framebuffer.
-  */
- static void drm_panic_fill(struct drm_scanout_buffer *sb, struct drm_rect *clip,
- 			   u32 color)
- {
- 	struct iosys_map map;
- 
- 	if (sb->set_pixel)
- 		return drm_panic_fill_pixel(sb, clip, color);
- 
- 	if (sb->pages)
- 		return drm_panic_fill_page(sb->pages, sb->pitch[0], sb->format->cpp[0],
- 					   clip, color);
- 
- 	map = sb->map[0];
- 	iosys_map_incr(&map, clip->y1 * sb->pitch[0] + clip->x1 * sb->format->cpp[0]);
- 
- 	switch (sb->format->cpp[0]) {
- 	case 2:
- 		drm_draw_fill16(&map, sb->pitch[0], drm_rect_height(clip),
- 				drm_rect_width(clip), color);
- 	break;
- 	case 3:
- 		drm_draw_fill24(&map, sb->pitch[0], drm_rect_height(clip),
- 				drm_rect_width(clip), color);
- 	break;
- 	case 4:
- 		drm_draw_fill32(&map, sb->pitch[0], drm_rect_height(clip),
- 				drm_rect_width(clip), color);
- 	break;
- 	default:
- 		WARN_ONCE(1, "Can't fill with pixel width %d\n", sb->format->cpp[0]);
- 	}
- }
- 
- static unsigned int get_max_line_len(const struct drm_panic_line *lines, int len)
- {
- 	int i;
- 	unsigned int max = 0;
- 
- 	for (i = 0; i < len; i++)
- 		max = max(lines[i].len, max);
- 	return max;
- }
- 
- /*
-  * Draw a text in a rectangle on a framebuffer. The text is truncated if it overflows the rectangle
-  */
- static void draw_txt_rectangle(struct drm_scanout_buffer *sb,
- 			       const struct font_desc *font,
- 			       const struct drm_panic_line *msg,
- 			       unsigned int msg_lines,
- 			       bool centered,
- 			       struct drm_rect *clip,
- 			       u32 color)
- {
- 	int i, j;
- 	const u8 *src;
- 	size_t font_pitch = DIV_ROUND_UP(font->width, 8);
- 	struct drm_rect rec;
- 
- 	msg_lines = min(msg_lines,  drm_rect_height(clip) / font->height);
- 	for (i = 0; i < msg_lines; i++) {
- 		size_t line_len = min(msg[i].len, drm_rect_width(clip) / font->width);
- 
- 		rec.y1 = clip->y1 +  i * font->height;
- 		rec.y2 = rec.y1 + font->height;
- 		rec.x1 = clip->x1;
- 
- 		if (centered)
- 			rec.x1 += (drm_rect_width(clip) - (line_len * font->width)) / 2;
- 
- 		for (j = 0; j < line_len; j++) {
- 			src = font_data_glyph_buf(font->data, font->width, font->height,
- 						  (unsigned char)msg[i].txt[j]);
- 			rec.x2 = rec.x1 + font->width;
- 			if (src)
- 				drm_panic_blit(sb, &rec, src, font_pitch, 1, color);
- 			rec.x1 += font->width;
- 		}
- 	}
- }
- 
- static void drm_panic_logo_rect(struct drm_rect *rect, const struct font_desc *font)
- {
- 	if (logo_mono) {
- 		drm_rect_init(rect, 0, 0, logo_mono->width, logo_mono->height);
- 	} else {
- 		int logo_width = get_max_line_len(logo_ascii, logo_ascii_lines) * font->width;
- 
- 		drm_rect_init(rect, 0, 0, logo_width, logo_ascii_lines * font->height);
- 	}
- }
- 
- static void drm_panic_logo_draw(struct drm_scanout_buffer *sb, struct drm_rect *rect,
- 				const struct font_desc *font, u32 fg_color)
- {
- 	if (rect->x2 > sb->width || rect->y2 > sb->height)
- 		return;
- 
- 	if (logo_mono)
- 		drm_panic_blit(sb, rect, logo_mono->data,
- 			       DIV_ROUND_UP(drm_rect_width(rect), 8), 1, fg_color);
- 	else
- 		draw_txt_rectangle(sb, font, logo_ascii, logo_ascii_lines, false, rect,
- 				   fg_color);
- }
- 
- static void draw_panic_screen_user(struct drm_scanout_buffer *sb)
- {
- 	u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
- 						    sb->format->format);
- 	u32 bg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_BACKGROUND_COLOR,
- 						    sb->format->format);
- 	const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL);
- 	struct drm_rect r_screen, r_logo, r_msg;
- 	unsigned int msg_width, msg_height;
- 
- 	if (!font)
- 		return;
- 
- 	r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
- 	drm_panic_logo_rect(&r_logo, font);
- 
- 	msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width);
- 	msg_height = min(panic_msg_lines * font->height, sb->height);
- 	r_msg = DRM_RECT_INIT(0, 0, msg_width, msg_height);
- 
- 	/* Center the panic message */
- 	drm_rect_translate(&r_msg, (sb->width - r_msg.x2) / 2, (sb->height - r_msg.y2) / 2);
- 
- 	/* Fill with the background color, and draw text on top */
- 	drm_panic_fill(sb, &r_screen, bg_color);
- 
- 	if (!drm_rect_overlap(&r_logo, &r_msg))
- 		drm_panic_logo_draw(sb, &r_logo, font, fg_color);
- 
- 	draw_txt_rectangle(sb, font, panic_msg, panic_msg_lines, true, &r_msg, fg_color);
- }
- 
- /*
-  * Draw one line of kmsg, and handle wrapping if it won't fit in the screen width.
-  * Return the y-offset of the next line.
-  */
- static int draw_line_with_wrap(struct drm_scanout_buffer *sb, const struct font_desc *font,
- 			       struct drm_panic_line *line, int yoffset, u32 fg_color)
- {
- 	int chars_per_row = sb->width / font->width;
- 	struct drm_rect r_txt = DRM_RECT_INIT(0, yoffset, sb->width, font->height);
- 	struct drm_panic_line line_wrap;
- 
- 	if (line->len > chars_per_row) {
- 		line_wrap.len = line->len % chars_per_row;
- 		line_wrap.txt = line->txt + line->len - line_wrap.len;
- 		draw_txt_rectangle(sb, font, &line_wrap, 1, false, &r_txt, fg_color);
- 		r_txt.y1 -= font->height;
- 		if (r_txt.y1 < 0)
- 			return r_txt.y1;
- 		while (line_wrap.txt > line->txt) {
- 			line_wrap.txt -= chars_per_row;
- 			line_wrap.len = chars_per_row;
- 			draw_txt_rectangle(sb, font, &line_wrap, 1, false, &r_txt, fg_color);
- 			r_txt.y1 -= font->height;
- 			if (r_txt.y1 < 0)
- 				return r_txt.y1;
- 		}
- 	} else {
- 		draw_txt_rectangle(sb, font, line, 1, false, &r_txt, fg_color);
- 		r_txt.y1 -= font->height;
- 	}
- 	return r_txt.y1;
- }
- 
- /*
-  * Draw the kmsg buffer to the screen, starting from the youngest message at the bottom,
-  * and going up until reaching the top of the screen.
-  */
- static void draw_panic_screen_kmsg(struct drm_scanout_buffer *sb)
- {
- 	u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
- 						    sb->format->format);
- 	u32 bg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_BACKGROUND_COLOR,
- 						    sb->format->format);
- 	const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL);
- 	struct drm_rect r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
- 	struct kmsg_dump_iter iter;
- 	/* the size printk formats one record into, too big for the stack */
- 	static char kmsg_buf[2048];
- 	size_t kmsg_len;
- 	struct drm_panic_line line;
- 	int yoffset;
- 
- 	if (!font || font->width > sb->width)
- 		return;
- 
- 	yoffset = sb->height - font->height - (sb->height % font->height) / 2;
- 
- 	/* Fill with the background color, and draw text on top */
- 	drm_panic_fill(sb, &r_screen, bg_color);
- 
- 	kmsg_dump_rewind(&iter);
- 	while (yoffset >= 0 && kmsg_dump_get_buffer(&iter, false, kmsg_buf,
- 	       sizeof(kmsg_buf), &kmsg_len)) {
- 		char *start;
- 		char *end;
- 
- 		/* a record that does not fit comes back empty, every time */
- 		if (!kmsg_len)
- 			break;
- 
- 		/* ignore terminating NUL and newline */
- 		start = kmsg_buf + kmsg_len - 2;
- 		end = kmsg_buf + kmsg_len - 1;
- 		while (start > kmsg_buf && yoffset >= 0) {
- 			while (start > kmsg_buf && *start != '\n')
- 				start--;
- 			/* don't count the newline character */
- 			line.txt = start + (start == kmsg_buf ? 0 : 1);
- 			line.len = end - line.txt;
- 
- 			yoffset = draw_line_with_wrap(sb, font, &line, yoffset, fg_color);
- 			end = start;
- 			start--;
- 		}
- 	}
- }
- 
  #if defined(CONFIG_DRM_PANIC_SCREEN_QR_CODE)
- /*
-  * It is unwise to allocate memory in the panic callback, so the buffers are
-  * pre-allocated. Only 2 buffers and the zlib workspace are needed.
-  * Two buffers are enough, using the following buffer usage:
-  * 1) kmsg messages are dumped in buffer1
-  * 2) kmsg is zlib-compressed into buffer2
-  * 3) compressed kmsg is encoded as QR-code Numeric stream in buffer1
-  * 4) QR-code image is generated in buffer2
-  * The Max QR code size is V40, 177x177, 4071 bytes for image, 2956 bytes for
-  * data segments.
-  *
-  * Typically, ~7500 bytes of kmsg, are compressed into 2800 bytes, which fits in
-  * a V40 QR-code (177x177).
-  *
-  * If CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL is not set, the kmsg data will be put
-  * directly in the QR code.
-  * 1) kmsg messages are dumped in buffer1
-  * 2) kmsg message is encoded as byte stream in buffer2
-  * 3) QR-code image is generated in buffer1
-  */
- 
  static uint panic_qr_version = CONFIG_DRM_PANIC_SCREEN_QR_VERSION;
  module_param(panic_qr_version, uint, 0644);
  MODULE_PARM_DESC(panic_qr_version, "maximum version (size) of the QR code");
- 
- #define MAX_QR_DATA 2956
- #define MAX_ZLIB_RATIO 3
- #define QR_BUFFER1_SIZE (MAX_ZLIB_RATIO * MAX_QR_DATA) /* Must also be > 4071  */
- #define QR_BUFFER2_SIZE 4096
- #define QR_MARGIN	4	/* 4 modules of foreground color around the qr code */
- 
- /* Compression parameters */
- #define COMPR_LEVEL 6
- #define WINDOW_BITS 12
- #define MEM_LEVEL 4
- 
- static char *qrbuf1;
- static char *qrbuf2;
- static struct z_stream_s stream;
- 
- static void __init drm_panic_qr_init(void)
- {
- 	qrbuf1 = kmalloc(QR_BUFFER1_SIZE, GFP_KERNEL);
- 	qrbuf2 = kmalloc(QR_BUFFER2_SIZE, GFP_KERNEL);
- 	stream.workspace = kmalloc(zlib_deflate_workspacesize(WINDOW_BITS, MEM_LEVEL),
- 				   GFP_KERNEL);
- }
- 
- static void drm_panic_qr_exit(void)
- {
- 	kfree(qrbuf1);
- 	qrbuf1 = NULL;
- 	kfree(qrbuf2);
- 	qrbuf2 = NULL;
- 	kfree(stream.workspace);
- 	stream.workspace = NULL;
- }
- 
- static int drm_panic_get_qr_code_url(u8 **qr_image)
- {
- 	struct kmsg_dump_iter iter;
- 	char url[256];
- 	size_t kmsg_len, max_kmsg_size;
- 	char *kmsg;
- 	int max_qr_data_size, url_len;
- 
- 	url_len = snprintf(url, sizeof(url), CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL "?a=%s&v=%s&z=",
- 			   utsname()->machine, utsname()->release);
- 
- 	max_qr_data_size = drm_panic_qr_max_data_size(panic_qr_version, url_len);
- 	max_kmsg_size = min(MAX_ZLIB_RATIO * max_qr_data_size, QR_BUFFER1_SIZE);
- 
- 	/* get kmsg to buffer 1 */
- 	kmsg_dump_rewind(&iter);
- 	kmsg_dump_get_buffer(&iter, false, qrbuf1, max_kmsg_size, &kmsg_len);
- 
- 	if (!kmsg_len)
- 		return -ENODATA;
- 	kmsg = qrbuf1;
- 
- try_again:
- 	if (zlib_deflateInit2(&stream, COMPR_LEVEL, Z_DEFLATED, WINDOW_BITS,
- 			      MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK)
- 		return -EINVAL;
- 
- 	stream.next_in = kmsg;
- 	stream.avail_in = kmsg_len;
- 	stream.total_in = 0;
- 	stream.next_out = qrbuf2;
- 	stream.avail_out = QR_BUFFER2_SIZE;
- 	stream.total_out = 0;
- 
- 	if (zlib_deflate(&stream, Z_FINISH) != Z_STREAM_END)
- 		return -EINVAL;
- 
- 	if (zlib_deflateEnd(&stream) != Z_OK)
- 		return -EINVAL;
- 
- 	if (stream.total_out > max_qr_data_size) {
- 		/* too much data for the QR code, so skip the first line and try again */
- 		kmsg = strchr(kmsg, '\n');
- 		if (!kmsg)
- 			return -EINVAL;
- 		/* skip the first \n */
- 		kmsg += 1;
- 		kmsg_len = strlen(kmsg);
- 		goto try_again;
- 	}
- 	*qr_image = qrbuf2;
- 
- 	/* generate qr code image in buffer2 */
- 	return drm_panic_qr_generate(url, qrbuf2, stream.total_out, QR_BUFFER2_SIZE,
- 				     qrbuf1, QR_BUFFER1_SIZE);
- }
- 
- static int drm_panic_get_qr_code_raw(u8 **qr_image)
- {
- 	struct kmsg_dump_iter iter;
- 	size_t kmsg_len;
- 	size_t max_kmsg_size = min(drm_panic_qr_max_data_size(panic_qr_version, 0),
- 				   QR_BUFFER1_SIZE);
- 
- 	kmsg_dump_rewind(&iter);
- 	kmsg_dump_get_buffer(&iter, false, qrbuf1, max_kmsg_size, &kmsg_len);
- 	if (!kmsg_len)
- 		return -ENODATA;
- 
- 	*qr_image = qrbuf1;
- 	return drm_panic_qr_generate(NULL, qrbuf1, kmsg_len, QR_BUFFER1_SIZE,
- 				     qrbuf2, QR_BUFFER2_SIZE);
- }
- 
- static int drm_panic_get_qr_code(u8 **qr_image)
- {
- 	if (strlen(CONFIG_DRM_PANIC_SCREEN_QR_CODE_URL) > 0)
- 		return drm_panic_get_qr_code_url(qr_image);
- 	else
- 		return drm_panic_get_qr_code_raw(qr_image);
- }
- 
- /*
-  * Draw the panic message at the center of the screen, with a QR Code
-  */
- static int _draw_panic_screen_qr_code(struct drm_scanout_buffer *sb)
- {
- 	u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
- 						    sb->format->format);
- 	u32 bg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_BACKGROUND_COLOR,
- 						    sb->format->format);
- 	const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL);
- 	struct drm_rect r_screen, r_logo, r_msg, r_qr, r_qr_canvas;
- 	unsigned int max_qr_size, scale;
- 	unsigned int msg_width, msg_height;
- 	int qr_width, qr_canvas_width, qr_pitch, v_margin;
- 	u8 *qr_image;
- 
- 	if (!font || !qrbuf1 || !qrbuf2 || !stream.workspace)
- 		return -ENOMEM;
- 
- 	r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
- 
- 	drm_panic_logo_rect(&r_logo, font);
- 
- 	msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width);
- 	msg_height = min(panic_msg_lines * font->height, sb->height);
- 	r_msg = DRM_RECT_INIT(0, 0, msg_width, msg_height);
- 
- 	max_qr_size = min(3 * sb->width / 4, 3 * sb->height / 4);
- 
- 	qr_width = drm_panic_get_qr_code(&qr_image);
- 	if (qr_width <= 0)
- 		return -ENOSPC;
- 
- 	qr_canvas_width = qr_width + QR_MARGIN * 2;
- 	scale = max_qr_size / qr_canvas_width;
- 	/* QR code is not readable if not scaled at least by 2 */
- 	if (scale < 2)
- 		return -ENOSPC;
- 
- 	pr_debug("QR width %d and scale %d\n", qr_width, scale);
- 	r_qr_canvas = DRM_RECT_INIT(0, 0, qr_canvas_width * scale, qr_canvas_width * scale);
- 
- 	v_margin = sb->height - drm_rect_height(&r_qr_canvas) - drm_rect_height(&r_msg);
- 	if (v_margin < 0)
- 		return -ENOSPC;
- 	v_margin /= 5;
- 
- 	drm_rect_translate(&r_qr_canvas, (sb->width - r_qr_canvas.x2) / 2, 2 * v_margin);
- 	r_qr = DRM_RECT_INIT(r_qr_canvas.x1 + QR_MARGIN * scale, r_qr_canvas.y1 + QR_MARGIN * scale,
- 			     qr_width * scale, qr_width * scale);
- 
- 	/* Center the panic message */
- 	drm_rect_translate(&r_msg, (sb->width - r_msg.x2) / 2,
- 			   3 * v_margin + drm_rect_height(&r_qr_canvas));
- 
- 	/* Fill with the background color, and draw text on top */
- 	drm_panic_fill(sb, &r_screen, bg_color);
- 
- 	if (!drm_rect_overlap(&r_logo, &r_msg) && !drm_rect_overlap(&r_logo, &r_qr_canvas))
- 		drm_panic_logo_draw(sb, &r_logo, font, fg_color);
- 
- 	draw_txt_rectangle(sb, font, panic_msg, panic_msg_lines, true, &r_msg, fg_color);
- 
- 	/* Draw the qr code */
- 	qr_pitch = DIV_ROUND_UP(qr_width, 8);
- 	drm_panic_fill(sb, &r_qr_canvas, fg_color);
- 	drm_panic_fill(sb, &r_qr, bg_color);
- 	drm_panic_blit(sb, &r_qr, qr_image, qr_pitch, scale, fg_color);
- 	return 0;
- }
- 
- static void draw_panic_screen_qr_code(struct drm_scanout_buffer *sb)
- {
- 	if (_draw_panic_screen_qr_code(sb))
- 		draw_panic_screen_user(sb);
- }
- #else
- static void drm_panic_qr_init(void) {};
- static void drm_panic_qr_exit(void) {};
  #endif
  
- enum drm_panic_type {
- 	DRM_PANIC_TYPE_KMSG,
- 	DRM_PANIC_TYPE_USER,
- 	DRM_PANIC_TYPE_QR,
- };
- 
  static enum drm_panic_type drm_panic_type = -1;
  
  static const char *drm_panic_type_map[] = {
@@@ -840,7 -66,7 +66,7 @@@ static int drm_panic_type_set(const cha
  	unsigned int i;
  
  	for (i = 0; i < ARRAY_SIZE(drm_panic_type_map); i++) {
 -		if (!strcmp(val, drm_panic_type_map[i])) {
 +		if (sysfs_streq(val, drm_panic_type_map[i])) {
  			drm_panic_type = i;
  			return 0;
  		}
@@@ -869,91 -95,34 +95,34 @@@ MODULE_PARM_DESC(panic_screen
  #endif
  		 CONFIG_DRM_PANIC_SCREEN "]");
  
- /*
-  * drm_panic_is_format_supported()
-  * @format: a fourcc color code
-  * Returns: true if supported, false otherwise.
-  *
-  * Check if drm_panic will be able to use this color format.
-  */
- static bool drm_panic_is_format_supported(const struct drm_format_info *format)
- {
- 	if (format->num_planes != 1)
- 		return false;
- 	return drm_draw_can_convert_from_xrgb8888(format->format);
- }
+ #define drm_panic_trylock(dev, flags) \
+ 	raw_spin_trylock_irqsave(&(dev)->mode_config.panic_lock, flags)
  
- static void draw_panic_dispatch(struct drm_scanout_buffer *sb)
+ static void drm_panic_display_panic_screen(struct drm_plane *plane, const char *description)
  {
- 	switch (drm_panic_type) {
- 	case DRM_PANIC_TYPE_KMSG:
- 		draw_panic_screen_kmsg(sb);
- 		break;
- 
- #if IS_ENABLED(CONFIG_DRM_PANIC_SCREEN_QR_CODE)
- 	case DRM_PANIC_TYPE_QR:
- 		draw_panic_screen_qr_code(sb);
- 		break;
+ #if defined(CONFIG_DRM_PANIC_FOREGROUND_COLOR)
+ 	u32 fg_color = CONFIG_DRM_PANIC_FOREGROUND_COLOR;
+ #else
+ 	u32 fg_color = 0x00ffffff;
  #endif
- 
- 	case DRM_PANIC_TYPE_USER:
- 	default:
- 		draw_panic_screen_user(sb);
- 	}
- }
- 
- static void drm_panic_set_description(const char *description)
- {
- 	u32 len;
- 
- 	if (description) {
- 		struct drm_panic_line *desc_line = &panic_msg[panic_msg_lines - 1];
- 
- 		desc_line->txt = description;
- 		len = strlen(description);
- 		/* ignore the last newline character */
- 		if (len && description[len - 1] == '\n')
- 			len -= 1;
- 		desc_line->len = len;
- 	}
- }
- 
- static void drm_panic_clear_description(void)
- {
- 	struct drm_panic_line *desc_line = &panic_msg[panic_msg_lines - 1];
- 
- 	desc_line->len = 0;
- 	desc_line->txt = NULL;
- }
- 
- static void draw_panic_plane(struct drm_plane *plane, const char *description)
- {
- 	struct drm_scanout_buffer sb = { };
- 	int ret;
+ #if defined(CONFIG_DRM_PANIC_BACKGROUND_COLOR)
+ 	u32 bg_color = CONFIG_DRM_PANIC_BACKGROUND_COLOR;
+ #else
+ 	u32 bg_color = 0x00000000;
+ #endif
+ #if IS_ENABLED(CONFIG_DRM_PANIC_SCREEN_QR_CODE)
+ 	unsigned int qr_version = panic_qr_version;
+ #else
+ 	unsigned int qr_version = 0;
+ #endif
+ 	struct drm_device *dev = plane->dev;
  	unsigned long flags;
  
- 	if (!drm_panic_trylock(plane->dev, flags))
- 		return;
- 
- 	ret = plane->helper_private->get_scanout_buffer(plane, &sb);
- 
- 	if (ret || !drm_panic_is_format_supported(sb.format))
- 		goto unlock;
- 
- 	/* One of these should be set, or it can't draw pixels */
- 	if (!sb.set_pixel && !sb.pages && iosys_map_is_null(&sb.map[0]))
- 		goto unlock;
- 
- 	drm_panic_set_description(description);
- 
- 	draw_panic_dispatch(&sb);
- 	if (plane->helper_private->panic_flush)
- 		plane->helper_private->panic_flush(plane);
- 
- 	drm_panic_clear_description();
- 
- unlock:
- 	drm_panic_unlock(plane->dev, flags);
+ 	if (drm_panic_trylock(dev, flags)) {
+ 		plane->funcs->display_panic_screen(plane, description, drm_panic_type,
+ 						   fg_color, bg_color, qr_version);
+ 		drm_panic_unlock(dev, flags);
+ 	}
  }
  
  static struct drm_plane *to_drm_plane(struct kmsg_dumper *kd)
@@@ -966,10 -135,9 +135,9 @@@ static void drm_panic(struct kmsg_dumpe
  	struct drm_plane *plane = to_drm_plane(dumper);
  
  	if (detail->reason == KMSG_DUMP_PANIC)
- 		draw_panic_plane(plane, detail->description);
+ 		drm_panic_display_panic_screen(plane, detail->description);
  }
  
- 
  /*
   * DEBUG FS, This is currently unsafe.
   * Create one file per plane, so it's possible to debug one plane at a time.
@@@ -986,7 -154,7 +154,7 @@@ static ssize_t debugfs_trigger_write(st
  	if (kstrtobool_from_user(user_buf, count, &run) == 0 && run) {
  		struct drm_plane *plane = file->private_data;
  
- 		draw_panic_plane(plane, "Test from debugfs");
+ 		drm_panic_display_panic_screen(plane, "Test from debugfs");
  	}
  	return count;
  }
@@@ -1022,9 -190,13 +190,13 @@@ bool drm_panic_is_enabled(struct drm_de
  	if (!dev->mode_config.num_total_plane)
  		return false;
  
- 	drm_for_each_plane(plane, dev)
- 		if (plane->helper_private && plane->helper_private->get_scanout_buffer)
- 			return true;
+ 	drm_for_each_plane(plane, dev) {
+ 		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+ 			continue;
+ 		if (!plane->funcs || !plane->funcs->display_panic_screen)
+ 			continue;
+ 		return true;
+ 	}
  	return false;
  }
  EXPORT_SYMBOL(drm_panic_is_enabled);
@@@ -1042,7 -214,9 +214,9 @@@ void drm_panic_register(struct drm_devi
  		return;
  
  	drm_for_each_plane(plane, dev) {
- 		if (!plane->helper_private || !plane->helper_private->get_scanout_buffer)
+ 		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+ 			continue;
+ 		if (!plane->funcs || !plane->funcs->display_panic_screen)
  			continue;
  		plane->kmsg_panic.dump = drm_panic;
  		plane->kmsg_panic.max_reason = KMSG_DUMP_PANIC;
@@@ -1069,7 -243,9 +243,9 @@@ void drm_panic_unregister(struct drm_de
  		return;
  
  	drm_for_each_plane(plane, dev) {
- 		if (!plane->helper_private || !plane->helper_private->get_scanout_buffer)
+ 		if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+ 			continue;
+ 		if (!plane->funcs || !plane->funcs->display_panic_screen)
  			continue;
  		kmsg_dump_unregister(&plane->kmsg_panic);
  	}
@@@ -1085,17 -261,4 +261,4 @@@ void __init drm_panic_init(void
  			CONFIG_DRM_PANIC_SCREEN);
  		drm_panic_type = DRM_PANIC_TYPE_USER;
  	}
- 	drm_panic_qr_init();
  }
- 
- /**
-  * drm_panic_exit() - Free the resources taken by drm_panic_exit()
-  */
- void drm_panic_exit(void)
- {
- 	drm_panic_qr_exit();
- }
- 
- #ifdef CONFIG_DRM_KUNIT_TEST
- #include "tests/drm_panic_test.c"
- #endif

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-09-28 14:15 Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2026-09-28 14:15 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Fan Wu, Intel Graphics, Linux Kernel Mailing List,
	Linux Next Mailing List, Maíra Canal, Simona Vetter,
	Song Li

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

Hi all,

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

  drivers/gpu/drm/vc4/vc4_v3d.c

between commit:

  94cf5971b1d04 ("drm/vc4: drain the hangcheck timer and works on V3D unbind")

from the drm-misc-fixes tree and commit:

  b4448823f151d ("drm/vc4: Use the reset controller to recover from a GPU hang")

from the drm 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.

diff --cc drivers/gpu/drm/vc4/vc4_v3d.c
index 0f0c090afa6e2,b40d98c9d1d28..0000000000000
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@@ -9,7 -9,7 +9,8 @@@
  #include <linux/component.h>
  #include <linux/platform_device.h>
  #include <linux/pm_runtime.h>
+ #include <linux/reset.h>
 +#include <linux/timer.h>
  
  #include <drm/drm_print.h>
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-09-18 11:14 Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2026-09-18 11:14 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Lyude Paul

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

Hi all,

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

  drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c

between commits:

  12f6eff11ccf9 ("drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr")
  adb87c20081e5 ("drm/nouveau/gsp/r570: Enable Gcoff in fbsr again")

from the drm-misc-fixes tree and commit:

  c7abe771e0138 ("drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr")

from the drm 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.

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-09-18 11:14 Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2026-09-18 11:14 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Lyude Paul,
	Mohamed Ahmed, Wentao Liang

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

Hi all,

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

  drivers/gpu/drm/nouveau/nouveau_connector.c

between commit:

  1e04611d37355 ("drm/nouveau: Fix runtime PM leak in nouveau_connector_detect()")

from the drm-misc-fixes tree and commit:

  0116f19db5931 ("drm/nouveau: honor HF-EEODB EDIDs by converting to struct drm_edid")

from the drm 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.

diff --combined drivers/gpu/drm/nouveau/nouveau_connector.c
index 4cfc9c7c2ae0c,cc3caf8de64b0..0000000000000
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@@ -397,7 -397,8 +397,8 @@@ nouveau_connector_destroy(struct drm_co
  	struct nouveau_connector *nv_connector = nouveau_connector(connector);
  	nvif_event_dtor(&nv_connector->irq);
  	nvif_event_dtor(&nv_connector->hpd);
- 	kfree(nv_connector->edid);
+ 	cancel_work_sync(&nv_connector->irq_work);
+ 	drm_edid_free(nv_connector->drm_edid);
  	drm_connector_unregister(connector);
  	drm_connector_cleanup(connector);
  	if (nv_connector->aux.transfer)
@@@ -469,6 -470,36 +470,36 @@@ nouveau_connector_ddc_detect(struct drm
  	return found;
  }
  
+ static void
+ nouveau_connector_set_edid(struct nouveau_connector *nv_connector,
+ 			   const struct drm_edid *drm_edid)
+ {
+ 	if (nv_connector->drm_edid == drm_edid)
+ 		return;
+ 
+ 	/* Updates the EDID property and display_info with HF-EEODB-aware
+ 	 * sizing. The legacy helpers truncate both to what EDID byte 126
+ 	 * admits, hiding the DisplayID extension blocks that carry the
+ 	 * high-refresh timings.
+ 	 */
+ 	drm_edid_connector_update(&nv_connector->base, drm_edid);
+ 
+ 	drm_edid_free(nv_connector->drm_edid);
+ 	nv_connector->drm_edid = drm_edid;
+ 
+ 	/* The SPWG link-count byte lives in a vendor descriptor drm has no
+ 	 * accessor for. Peek at it once here so nothing else needs the raw
+ 	 * EDID.
+ 	 */
+ 	nv_connector->spwg_links = 0;
+ 	if (nv_connector->type == DCB_CONNECTOR_LVDS_SPWG) {
+ 		const u8 *raw = (const u8 *)drm_edid_raw(drm_edid);
+ 
+ 		if (raw)
+ 			nv_connector->spwg_links = raw[121] == 2 ? 2 : 1;
+ 	}
+ }
+ 
  static struct nouveau_encoder *
  nouveau_connector_of_detect(struct drm_connector *connector)
  {
@@@ -490,8 -521,17 +521,17 @@@
  		int idx = name ? name[strlen(name) - 1] - 'A' : 0;
  
  		if (nv_encoder->dcb->i2c_index == idx && edid) {
- 			nv_connector->edid =
- 				kmemdup(edid, EDID_LENGTH, GFP_KERNEL);
+ 			const struct drm_edid *drm_edid =
+ 				drm_edid_alloc(edid, EDID_LENGTH);
+ 
+ 			/* Firmware-provided, so validate it like the DDC
+ 			 * readers would.
+ 			 */
+ 			if (drm_edid && !drm_edid_valid(drm_edid)) {
+ 				drm_edid_free(drm_edid);
+ 				drm_edid = NULL;
+ 			}
+ 			nouveau_connector_set_edid(nv_connector, drm_edid);
  			return nv_encoder;
  		}
  	}
@@@ -546,17 -586,23 +586,23 @@@ nouveau_connector_set_encoder(struct dr
  	}
  }
  
- static void
- nouveau_connector_set_edid(struct nouveau_connector *nv_connector,
- 			   struct edid *edid)
- {
- 	if (nv_connector->edid != edid) {
- 		struct edid *old_edid = nv_connector->edid;
+ struct nouveau_rm_edid {
+ 	u8 *data;
+ 	size_t size;
+ };
  
- 		drm_connector_update_edid_property(&nv_connector->base, edid);
- 		kfree(old_edid);
- 		nv_connector->edid = edid;
- 	}
+ static int
+ nouveau_connector_rm_edid_block(void *context, u8 *buf, unsigned int block,
+ 				size_t len)
+ {
+ 	struct nouveau_rm_edid *rm = context;
+ 	size_t offset = (size_t)block * EDID_LENGTH;
+ 
+ 	if (offset + len > rm->size)
+ 		return -EINVAL;
+ 
+ 	memcpy(buf, rm->data + offset, len);
+ 	return 0;
  }
  
  static enum drm_connector_status
@@@ -590,25 -636,37 +636,37 @@@ nouveau_connector_detect(struct drm_con
  
  	nv_encoder = nouveau_connector_ddc_detect(connector);
  	if (nv_encoder) {
- 		struct edid *new_edid = NULL;
+ 		const struct drm_edid *new_edid = NULL;
  
  		if (nv_encoder->i2c) {
  			if ((vga_switcheroo_handler_flags() & VGA_SWITCHEROO_CAN_SWITCH_DDC) &&
  			    nv_connector->type == DCB_CONNECTOR_LVDS)
- 				new_edid = drm_get_edid_switcheroo(connector, nv_encoder->i2c);
+ 				new_edid = drm_edid_read_switcheroo(connector, nv_encoder->i2c);
  			else
- 				new_edid = drm_get_edid(connector, nv_encoder->i2c);
+ 				new_edid = drm_edid_read_ddc(connector, nv_encoder->i2c);
  		} else {
- 			ret = nvif_outp_edid_get(&nv_encoder->outp, (u8 **)&new_edid);
- 			if (ret < 0) {
- 				pm_runtime_mark_last_busy(dev->dev);
- 				pm_runtime_put_autosuspend(dev->dev);
- 				return connector_status_disconnected;
+ 			struct nouveau_rm_edid rm = {};
+ 
+ 			/* RM (which owns the DDC pads on GSP boards) reads the
+ 			 * EDID whole and returns its true size, which for an
+ 			 * HF-EEODB EDID exceeds what byte 126 admits. Serve it
+ 			 * through drm's block reader so EEODB sizing, block
+ 			 * validation, and the debugfs EDID override all apply.
+ 			 * A failed read is treated like an empty DDC read,
+ 			 * which releases the runtime-PM reference.
+ 			 */
+ 			ret = nvif_outp_edid_get(&nv_encoder->outp, &rm.data);
+ 			if (ret >= 0) {
+ 				rm.size = ret;
+ 				new_edid = drm_edid_read_custom(connector,
+ 								nouveau_connector_rm_edid_block,
+ 								&rm);
+ 				kfree(rm.data);
  			}
  		}
  
  		nouveau_connector_set_edid(nv_connector, new_edid);
- 		if (!nv_connector->edid) {
+ 		if (!nv_connector->drm_edid) {
  			NV_ERROR(drm, "DDC responded, but no EDID for %s\n",
  				 connector->name);
  			goto detect_analog;
@@@ -629,7 -687,7 +687,7 @@@
  				    nv_partner->dcb->type == DCB_OUTPUT_TMDS) ||
  				   (nv_encoder->dcb->type == DCB_OUTPUT_TMDS &&
  				    nv_partner->dcb->type == DCB_OUTPUT_ANALOG))) {
- 			if (nv_connector->edid->input & DRM_EDID_INPUT_DIGITAL)
+ 			if (drm_edid_is_digital(nv_connector->drm_edid))
  				type = DCB_OUTPUT_TMDS;
  			else
  				type = DCB_OUTPUT_ANALOG;
@@@ -641,7 -699,8 +699,8 @@@
  		conn_status = connector_status_connected;
  
  		if (nv_encoder->dcb->type == DCB_OUTPUT_DP)
- 			drm_dp_cec_set_edid(&nv_connector->aux, nv_connector->edid);
+ 			drm_dp_cec_attach(&nv_connector->aux,
+ 					  connector->display_info.source_physical_address);
  
  		goto out;
  	} else {
@@@ -673,7 -732,7 +732,7 @@@ detect_analog
  	}
  
   out:
- 	if (!nv_connector->edid)
+ 	if (!nv_connector->drm_edid)
  		drm_dp_cec_unset_edid(&nv_connector->aux);
  
  	pm_runtime_mark_last_busy(dev->dev);
@@@ -689,7 -748,7 +748,7 @@@ nouveau_connector_detect_lvds(struct dr
  	struct nouveau_drm *drm = nouveau_drm(dev);
  	struct nouveau_connector *nv_connector = nouveau_connector(connector);
  	struct nouveau_encoder *nv_encoder = NULL;
- 	struct edid *edid = NULL;
+ 	const struct drm_edid *edid = NULL;
  	enum drm_connector_status status = connector_status_disconnected;
  
  	nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS);
@@@ -700,7 -759,7 +759,7 @@@
  	if (!drm->vbios.fp_no_ddc) {
  		status = nouveau_connector_detect(connector, force);
  		if (status == connector_status_connected) {
- 			edid = nv_connector->edid;
+ 			edid = nv_connector->drm_edid;
  			goto out;
  		}
  	}
@@@ -736,11 -795,20 +795,20 @@@
  	 * stored for the panel stored in them.
  	 */
  	if (!drm->vbios.fp_no_ddc) {
- 		edid = (struct edid *)nouveau_bios_embedded_edid(dev);
- 		if (edid) {
- 			edid = kmemdup(edid, EDID_LENGTH, GFP_KERNEL);
+ 		const void *embedded = nouveau_bios_embedded_edid(dev);
+ 
+ 		if (embedded) {
+ 			edid = drm_edid_alloc(embedded, EDID_LENGTH);
+ 			/* The panel is there either way, so report it
+ 			 * connected and let the probe helper fall back to a
+ 			 * default mode if the EDID itself is unusable.
+ 			 */
  			if (edid)
  				status = connector_status_connected;
+ 			if (edid && !drm_edid_valid(edid)) {
+ 				drm_edid_free(edid);
+ 				edid = NULL;
+ 			}
  		}
  	}
  
@@@ -889,7 -957,7 +957,7 @@@ nouveau_connector_detect_depth(struct d
  	bool duallink;
  
  	/* if the edid is feeling nice enough to provide this info, use it */
- 	if (nv_connector->edid && connector->display_info.bpc)
+ 	if (nv_connector->drm_edid && connector->display_info.bpc)
  		return;
  
  	/* EDID 1.4 is *supposed* to be supported on eDP, but, Apple... */
@@@ -916,9 -984,8 +984,8 @@@
  	/* LVDS: DDC panel, need to first determine the number of links to
  	 * know which if_is_24bit flag to check...
  	 */
- 	if (nv_connector->edid &&
- 	    nv_connector->type == DCB_CONNECTOR_LVDS_SPWG)
- 		duallink = ((u8 *)nv_connector->edid)[121] == 2;
+ 	if (nv_connector->spwg_links)
+ 		duallink = nv_connector->spwg_links == 2;
  	else
  		duallink = mode->clock >= bios->fp.duallink_transition_clk;
  
@@@ -976,12 -1043,17 +1043,17 @@@ nouveau_connector_get_modes(struct drm_
  		nv_connector->native_mode = NULL;
  	}
  
- 	if (nv_connector->edid)
- 		ret = drm_add_edid_modes(connector, nv_connector->edid);
- 	else
- 	if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
- 	    (nv_encoder->dcb->lvdsconf.use_straps_for_mode ||
- 	     drm->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) {
+ 	if (nv_connector->drm_edid) {
+ 		/* The probe helper clears the property and display_info for
+ 		 * a forced-off connector without calling detect(). Re-sync
+ 		 * from our copy then, since add_modes() reads the property.
+ 		 */
+ 		if (!connector->edid_blob_ptr)
+ 			drm_edid_connector_update(connector, nv_connector->drm_edid);
+ 		ret = drm_edid_connector_add_modes(connector);
+ 	} else if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS &&
+ 		   (nv_encoder->dcb->lvdsconf.use_straps_for_mode ||
+ 		    drm->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) {
  		struct drm_display_mode mode;
  
  		nouveau_bios_fp_mode(dev, &mode);

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-08-12 15:45 Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2026-08-12 15:45 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Alex Deucher, Gangliang Xie, Lijo Lazar,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Tvrtko Ursulin, Tvrtko Ursulin, Xiang Liu

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

Hi all,

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

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

between commit:

  67cf83ac8316a ("Revert "drm/sched: Embed run queue singleton into the scheduler"")

from the drm-misc-fixes tree and commits:

  4a33d82e224c8 ("drm/amdgpu: protect XCP scheduler selection")
  fa1531170d2c9 ("drm/amdgpu: add check for xcp id")
  6e8a3c24bd75f ("drm/amdgpu: bounds check xcp_id in release_sched")
  7445035dd3f22 ("drm/amdgpu: bounds check xcp ip block index")
  62d8b452615fd ("drm/amdgpu: Fix kobject cleanup in xcp sysfs")

from the drm 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.

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
index 42be8ee155dde,35faea0ff17ff..0000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c
@@@ -466,16 -467,20 +467,21 @@@ int amdgpu_xcp_open_device(struct amdgp
  void amdgpu_xcp_release_sched(struct amdgpu_device *adev,
  				  struct amdgpu_ctx_entity *entity)
  {
 -	struct drm_gpu_scheduler *sched =
 -		container_of(entity->entity.rq, typeof(*sched), rq);
 +	struct drm_gpu_scheduler *sched;
 +	struct amdgpu_ring *ring;
+ 	struct amdgpu_xcp_mgr *xcp_mgr = adev->xcp_mgr;
  
- 	if (!adev->xcp_mgr)
+ 	if (!xcp_mgr)
  		return;
  
 +	sched = entity->entity.rq->sched;
  	if (drm_sched_wqueue_ready(sched)) {
 -		struct amdgpu_ring *ring = to_amdgpu_ring(sched);
 +		ring = to_amdgpu_ring(entity->entity.rq->sched);
- 		atomic_dec(&adev->xcp_mgr->xcp[ring->xcp_id].ref_cnt);
+ 
+ 		mutex_lock(&xcp_mgr->xcp_lock);
+ 		if (ring->xcp_id < xcp_mgr->num_xcps && xcp_mgr->xcp[ring->xcp_id].valid)
+ 			atomic_dec(&xcp_mgr->xcp[ring->xcp_id].ref_cnt);
+ 		mutex_unlock(&xcp_mgr->xcp_lock);
  	}
  }
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-08-12 12:20 Mark Brown
  0 siblings, 0 replies; 62+ messages in thread
From: Mark Brown @ 2026-08-12 12:20 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Philipp Stanner, Tvrtko Ursulin, Tvrtko Ursulin

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

Hi all,

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

  drivers/gpu/drm/scheduler/sched_entity.c

between commits:

  67cf83ac8316a ("Revert "drm/sched: Embed run queue singleton into the scheduler"")

from the drm-misc-fixes tree and commit:

  2df5efb45425b ("drm/sched: Remove redundant entity->rq initialization and checks")

from the drm 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.

diff --combined drivers/gpu/drm/scheduler/sched_entity.c
index 672b5c57ed8e9,c51101ec70c16..0000000000000
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@@ -129,43 -129,14 +129,42 @@@ int drm_sched_entity_init(struct drm_sc
  		return -ENOMEM;
  
  	INIT_LIST_HEAD(&entity->list);
- 	entity->rq = NULL;
  	entity->guilty = guilty;
  	entity->priority = priority;
  	entity->last_user = current->group_leader;
 +	entity->rq_priority = drm_sched_policy == DRM_SCHED_POLICY_FAIR ?
 +			      DRM_SCHED_PRIORITY_KERNEL : priority;
  	entity->num_sched_list = num_sched_list;
  	entity->sched_list = num_sched_list > 1 ? sched_list : NULL;
 -	entity->rq = &sched_list[0]->rq;
  	RCU_INIT_POINTER(entity->last_scheduled, NULL);
  	RB_CLEAR_NODE(&entity->rb_tree_node);
 +
 +	if (!sched_list[0]->sched_rq) {
 +		/* Since every entry covered by num_sched_list
 +		 * should be non-NULL and therefore we warn drivers
 +		 * not to do this and to fix their DRM calling order.
 +		 */
 +		pr_warn("%s: called with uninitialized scheduler\n", __func__);
 +	} else {
 +		enum drm_sched_priority p = entity->priority;
 +
 +		/*
 +		 * The "priority" of an entity cannot exceed the number of
 +		 * run-queues of a scheduler. Protect against num_rqs being 0,
 +		 * by converting to signed. Choose the lowest priority
 +		 * available.
 +		 */
 +		if (p >= sched_list[0]->num_user_rqs) {
 +			dev_err(sched_list[0]->dev, "entity with out-of-bounds priority:%u num_user_rqs:%u\n",
 +				p, sched_list[0]->num_user_rqs);
 +			p = max_t(s32,
 +				  (s32)sched_list[0]->num_user_rqs - 1,
 +				  (s32)DRM_SCHED_PRIORITY_KERNEL);
 +			entity->priority = p;
 +		}
 +		entity->rq = sched_list[0]->sched_rq[entity->rq_priority];
 +	}
 +
  	init_completion(&entity->entity_idle);
  
  	/* We start in an idle state. */
@@@ -308,9 -279,6 +307,6 @@@ void drm_sched_entity_kill(struct drm_s
  	struct drm_sched_job *job;
  	struct dma_fence *prev;
  
- 	if (!entity->rq)
- 		return;
- 
  	spin_lock(&entity->lock);
  	entity->stopped = true;
  	drm_sched_rq_remove_entity(entity->rq, entity);
@@@ -357,14 -325,11 +353,11 @@@ EXPORT_SYMBOL(drm_sched_entity_kill)
   */
  long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
  {
- 	struct drm_gpu_scheduler *sched;
+ 	struct drm_gpu_scheduler *sched =
+ 		container_of(entity->rq, typeof(*sched), rq);
  	struct task_struct *last_user;
  	long ret = timeout;
  
- 	if (!entity->rq)
- 		return 0;
- 
- 	sched = entity->rq->sched;
  	/*
  	 * The client will not queue more jobs during this fini - consume
  	 * existing queued ones, or discard them on SIGKILL.
@@@ -445,10 -410,12 +438,10 @@@ static void drm_sched_entity_wakeup(str
  {
  	struct drm_sched_entity *entity =
  		container_of(cb, struct drm_sched_entity, cb);
 -	struct drm_gpu_scheduler *sched =
 -		container_of(entity->rq, typeof(*sched), rq);
  
  	entity->dependency = NULL;
  	dma_fence_put(f);
 -	drm_sched_wakeup(sched);
 +	drm_sched_wakeup(entity->rq->sched);
  }
  
  /**
@@@ -475,7 -442,8 +468,7 @@@ EXPORT_SYMBOL(drm_sched_entity_set_prio
  static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity,
  					       struct drm_sched_job *sched_job)
  {
 -	struct drm_gpu_scheduler *sched =
 -		container_of(entity->rq, typeof(*sched), rq);
 +	struct drm_gpu_scheduler *sched = entity->rq->sched;
  	struct dma_fence *fence = entity->dependency;
  	struct drm_sched_fence *s_fence;
  
@@@ -609,7 -577,7 +602,7 @@@ void drm_sched_entity_select_rq(struct 
  
  	spin_lock(&entity->lock);
  	sched = drm_sched_pick_best(entity->sched_list, entity->num_sched_list);
 -	rq = sched ? &sched->rq : NULL;
 +	rq = sched ? sched->sched_rq[entity->rq_priority] : NULL;
  	if (rq != entity->rq) {
  		drm_sched_rq_remove_entity(entity->rq, entity);
  		entity->rq = rq;
@@@ -633,8 -601,9 +626,8 @@@
  void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
  {
  	struct drm_sched_entity *entity = sched_job->entity;
 -	struct drm_gpu_scheduler *sched =
 -		container_of(entity->rq, typeof(*sched), rq);
  	bool first;
 +	ktime_t submit_ts;
  
  	trace_drm_sched_job_queue(sched_job, entity);
  
@@@ -645,22 -614,18 +638,22 @@@
  		xa_for_each(&sched_job->dependencies, index, entry)
  			trace_drm_sched_job_add_dep(sched_job, entry);
  	}
 -	atomic_inc(sched->score);
 +	atomic_inc(entity->rq->sched->score);
  	WRITE_ONCE(entity->last_user, current->group_leader);
  
  	/*
  	 * After the sched_job is pushed into the entity queue, it may be
  	 * completed and freed up at any time. We can no longer access it.
 +	 * Make sure to set the submit_ts first, to avoid a race.
  	 */
 +	sched_job->submit_ts = submit_ts = ktime_get();
  	first = spsc_queue_push(&entity->job_queue, &sched_job->queue_node);
  
  	/* first job wakes up scheduler */
  	if (first) {
 -		sched = drm_sched_rq_add_entity(entity);
 +		struct drm_gpu_scheduler *sched;
 +
 +		sched = drm_sched_rq_add_entity(entity, submit_ts);
  		if (sched)
  			drm_sched_wakeup(sched);
  	}

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-06-11 13:54 Mark Brown
  2026-06-16  9:16 ` Geert Uytterhoeven
  0 siblings, 1 reply; 62+ messages in thread
From: Mark Brown @ 2026-06-11 13:54 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Jani Nikula, Linux Kernel Mailing List, Linux Next Mailing List,
	Maxime Ripard, Melissa Wen, Melissa Wen

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

Hi all,

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

  drivers/gpu/drm/drm_atomic.c
  include/drm/drm_colorop.h

between commit:

  94ff735296d371 ("drm/colorop: make lut(1/3)d_interpolation props correctly behave as mutable")

from the drm-misc-fixes tree and commits:

  5164f7e7ff8ec7 ("drm: Rename struct drm_atomic_state to drm_atomic_commit")
  0c44d8dc6df988 ("drm/atomic: prefer drm_printf_indent() over inline \t")

from the drm 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.

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-03-20 14:17 Mark Brown
  2026-03-20 15:39 ` Boris Brezillon
  0 siblings, 1 reply; 62+ messages in thread
From: Mark Brown @ 2026-03-20 14:17 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Boris Brezillon, Linux Kernel Mailing List,
	Linux Next Mailing List, Pedro Demarchi Gomes, Thomas Zimmermann

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

Hi all,

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

  drivers/gpu/drm/drm_gem_shmem_helper.c

between commit:

  fc3bbf34e643f ("drm/shmem-helper: Fix huge page mapping in fault handler")

from the drm-misc-fixes tree and commits:

  5cf8de6cd1620 ("drm/gem-shmem: Return vm_fault_t from drm_gem_shmem_try_map_pmd()")
  06f3662cb3ba9 ("drm/gem-shmem: Refactor drm_gem_shmem_try_map_pmd()")

from the drm 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.

diff --cc drivers/gpu/drm/drm_gem_shmem_helper.c
index c549293b5bb61,4500deef41278..0000000000000
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@@ -550,27 -554,23 +554,23 @@@ int drm_gem_shmem_dumb_create(struct dr
  }
  EXPORT_SYMBOL_GPL(drm_gem_shmem_dumb_create);
  
- static vm_fault_t try_insert_pfn(struct vm_fault *vmf, unsigned int order,
- 				 unsigned long pfn)
+ static vm_fault_t drm_gem_shmem_try_insert_pfn_pmd(struct vm_fault *vmf, unsigned long pfn)
  {
- 	if (!order) {
- 		return vmf_insert_pfn(vmf->vma, vmf->address, pfn);
  #ifdef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
- 	} else if (order == PMD_ORDER) {
- 		unsigned long paddr = pfn << PAGE_SHIFT;
- 		bool aligned = (vmf->address & ~PMD_MASK) == (paddr & ~PMD_MASK);
+ 	unsigned long paddr = pfn << PAGE_SHIFT;
+ 	bool aligned = (vmf->address & ~PMD_MASK) == (paddr & ~PMD_MASK);
  
- 		if (aligned &&
- 		    folio_test_pmd_mappable(page_folio(pfn_to_page(pfn)))) {
- 			pfn &= PMD_MASK >> PAGE_SHIFT;
- 			return vmf_insert_pfn_pmd(vmf, pfn, false);
- 		}
- #endif
+ 	if (aligned && pmd_none(*vmf->pmd)) {
+ 		/* Read-only mapping; split upon write fault */
+ 		pfn &= PMD_MASK >> PAGE_SHIFT;
+ 		return vmf_insert_pfn_pmd(vmf, pfn, false);
  	}
- 	return VM_FAULT_FALLBACK;
+ #endif
+ 
+ 	return 0;
  }
  
 -static vm_fault_t drm_gem_shmem_fault(struct vm_fault *vmf)
 +static vm_fault_t drm_gem_shmem_any_fault(struct vm_fault *vmf, unsigned int order)
  {
  	struct vm_area_struct *vma = vmf->vma;
  	struct drm_gem_object *obj = vma->vm_private_data;
@@@ -644,13 -645,29 +650,32 @@@ static void drm_gem_shmem_vm_close(stru
  	drm_gem_vm_close(vma);
  }
  
+ static vm_fault_t drm_gem_shmem_pfn_mkwrite(struct vm_fault *vmf)
+ {
+ 	struct vm_area_struct *vma = vmf->vma;
+ 	struct drm_gem_object *obj = vma->vm_private_data;
+ 	struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
+ 	loff_t num_pages = obj->size >> PAGE_SHIFT;
+ 	pgoff_t page_offset = vmf->pgoff - vma->vm_pgoff; /* page offset within VMA */
+ 
+ 	if (drm_WARN_ON(obj->dev, !shmem->pages || page_offset >= num_pages))
+ 		return VM_FAULT_SIGBUS;
+ 
+ 	file_update_time(vma->vm_file);
+ 
+ 	folio_mark_dirty(page_folio(shmem->pages[page_offset]));
+ 
+ 	return 0;
+ }
+ 
  const struct vm_operations_struct drm_gem_shmem_vm_ops = {
  	.fault = drm_gem_shmem_fault,
 +#ifdef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
 +	.huge_fault = drm_gem_shmem_any_fault,
 +#endif
  	.open = drm_gem_shmem_vm_open,
  	.close = drm_gem_shmem_vm_close,
+ 	.pfn_mkwrite = drm_gem_shmem_pfn_mkwrite,
  };
  EXPORT_SYMBOL_GPL(drm_gem_shmem_vm_ops);
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-03-18 14:36 Mark Brown
  2026-03-18 15:49 ` Luca Ceresoli
  0 siblings, 1 reply; 62+ messages in thread
From: Mark Brown @ 2026-03-18 14:36 UTC (permalink / raw)
  To: Dave Airlie, DRI
  Cc: Christian Hewitt, Cristian Ciocaltea, Daniel Stone,
	Jonas Karlman, Linux Kernel Mailing List,
	Linux Next Mailing List, Luca Ceresoli

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

Hi all,

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

  drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c

between commit:

  cffcb42c57686 ("drm/bridge: dw-hdmi-qp: fix multi-channel audio output")

from the drm-misc-fixes tree and commit:

  3ea699b56d31c ("drm/bridge: dw-hdmi-qp: Rework Audio InfoFrame handler")

from the drm 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.

diff --combined drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index facfb7526928d,d649a1cf07f5c..0000000000000
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@@ -11,6 -11,7 +11,7 @@@
  #include <linux/export.h>
  #include <linux/i2c.h>
  #include <linux/irq.h>
+ #include <linux/minmax.h>
  #include <linux/module.h>
  #include <linux/mutex.h>
  #include <linux/of.h>
@@@ -748,120 -749,6 +749,6 @@@ static struct i2c_adapter *dw_hdmi_qp_i
  	return adap;
  }
  
- static int dw_hdmi_qp_config_avi_infoframe(struct dw_hdmi_qp *hdmi,
- 					   const u8 *buffer, size_t len)
- {
- 	u32 val, i, j;
- 
- 	if (len != HDMI_INFOFRAME_SIZE(AVI)) {
- 		dev_err(hdmi->dev, "failed to configure avi infoframe\n");
- 		return -EINVAL;
- 	}
- 
- 	/*
- 	 * DW HDMI QP IP uses a different byte format from standard AVI info
- 	 * frames, though generally the bits are in the correct bytes.
- 	 */
- 	val = buffer[1] << 8 | buffer[2] << 16;
- 	dw_hdmi_qp_write(hdmi, val, PKT_AVI_CONTENTS0);
- 
- 	for (i = 0; i < 4; i++) {
- 		for (j = 0; j < 4; j++) {
- 			if (i * 4 + j >= 14)
- 				break;
- 			if (!j)
- 				val = buffer[i * 4 + j + 3];
- 			val |= buffer[i * 4 + j + 3] << (8 * j);
- 		}
- 
- 		dw_hdmi_qp_write(hdmi, val, PKT_AVI_CONTENTS1 + i * 4);
- 	}
- 
- 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_AVI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
- 
- 	dw_hdmi_qp_mod(hdmi, PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN,
- 		       PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN, PKTSCHED_PKT_EN);
- 
- 	return 0;
- }
- 
- static int dw_hdmi_qp_config_drm_infoframe(struct dw_hdmi_qp *hdmi,
- 					   const u8 *buffer, size_t len)
- {
- 	u32 val, i;
- 
- 	if (len != HDMI_INFOFRAME_SIZE(DRM)) {
- 		dev_err(hdmi->dev, "failed to configure drm infoframe\n");
- 		return -EINVAL;
- 	}
- 
- 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_TX_EN, PKTSCHED_PKT_EN);
- 
- 	val = buffer[1] << 8 | buffer[2] << 16;
- 	dw_hdmi_qp_write(hdmi, val, PKT_DRMI_CONTENTS0);
- 
- 	for (i = 0; i <= buffer[2]; i++) {
- 		if (i % 4 == 0)
- 			val = buffer[3 + i];
- 		val |= buffer[3 + i] << ((i % 4) * 8);
- 
- 		if ((i % 4 == 3) || i == buffer[2])
- 			dw_hdmi_qp_write(hdmi, val,
- 					 PKT_DRMI_CONTENTS1 + ((i / 4) * 4));
- 	}
- 
- 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
- 	dw_hdmi_qp_mod(hdmi, PKTSCHED_DRMI_TX_EN, PKTSCHED_DRMI_TX_EN,
- 		       PKTSCHED_PKT_EN);
- 
- 	return 0;
- }
- 
- /*
-  * Static values documented in the TRM
-  * Different values are only used for debug purposes
-  */
- #define DW_HDMI_QP_AUDIO_INFOFRAME_HB1	0x1
- #define DW_HDMI_QP_AUDIO_INFOFRAME_HB2	0xa
- 
- static int dw_hdmi_qp_config_audio_infoframe(struct dw_hdmi_qp *hdmi,
- 					     const u8 *buffer, size_t len)
- {
- 	/*
- 	 * AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
- 	 * AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
- 	 * AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }
- 	 *
- 	 * PB0: CheckSum
- 	 * PB1: | CT3    | CT2  | CT1  | CT0  | F13  | CC2 | CC1 | CC0 |
- 	 * PB2: | F27    | F26  | F25  | SF2  | SF1  | SF0 | SS1 | SS0 |
- 	 * PB3: | F37    | F36  | F35  | F34  | F33  | F32 | F31 | F30 |
- 	 * PB4: | CA7    | CA6  | CA5  | CA4  | CA3  | CA2 | CA1 | CA0 |
- 	 * PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
- 	 * PB6~PB10: Reserved
- 	 *
- 	 * AUDI_CONTENTS0 default value defined by HDMI specification,
- 	 * and shall only be changed for debug purposes.
- 	 */
- 	u32 header_bytes = (DW_HDMI_QP_AUDIO_INFOFRAME_HB1 << 8) |
- 			  (DW_HDMI_QP_AUDIO_INFOFRAME_HB2 << 16);
- 
- 	regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS0, &header_bytes, 1);
- 	regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS1, &buffer[3], 1);
- 	regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS2, &buffer[7], 1);
- 
- 	/* Enable ACR, AUDI, AMD */
- 	dw_hdmi_qp_mod(hdmi,
- 		       PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
- 		       PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
- 		       PKTSCHED_PKT_EN);
- 
- 	/* Enable AUDS */
- 	dw_hdmi_qp_mod(hdmi, PKTSCHED_AUDS_TX_EN, PKTSCHED_AUDS_TX_EN, PKTSCHED_PKT_EN);
- 
- 	return 0;
- }
- 
  static void dw_hdmi_qp_bridge_atomic_enable(struct drm_bridge *bridge,
  					    struct drm_atomic_state *state)
  {
@@@ -970,9 -857,9 +857,9 @@@ static int dw_hdmi_qp_bridge_clear_avi_
  
  static int dw_hdmi_qp_bridge_clear_hdmi_infoframe(struct drm_bridge *bridge)
  {
- 	/* FIXME: add support for this InfoFrame */
+ 	struct dw_hdmi_qp *hdmi = bridge->driver_private;
  
- 	drm_warn_once(bridge->encoder->dev, "HDMI VSI not supported\n");
+ 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_VSI_TX_EN, PKTSCHED_PKT_EN);
  
  	return 0;
  }
@@@ -986,6 -873,15 +873,15 @@@ static int dw_hdmi_qp_bridge_clear_hdr_
  	return 0;
  }
  
+ static int dw_hdmi_qp_bridge_clear_spd_infoframe(struct drm_bridge *bridge)
+ {
+ 	struct dw_hdmi_qp *hdmi = bridge->driver_private;
+ 
+ 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_SPDI_TX_EN, PKTSCHED_PKT_EN);
+ 
+ 	return 0;
+ }
+ 
  static int dw_hdmi_qp_bridge_clear_audio_infoframe(struct drm_bridge *bridge)
  {
  	struct dw_hdmi_qp *hdmi = bridge->driver_private;
@@@ -999,6 -895,32 +895,32 @@@
  	return 0;
  }
  
+ static void dw_hdmi_qp_write_pkt(struct dw_hdmi_qp *hdmi, const u8 *buffer,
+ 				 size_t start, size_t len, unsigned int reg)
+ {
+ 	u32 val = 0;
+ 	size_t i;
+ 
+ 	for (i = start; i < start + len; i++)
+ 		val |= buffer[i] << ((i % 4) * BITS_PER_BYTE);
+ 
+ 	dw_hdmi_qp_write(hdmi, val, reg);
+ }
+ 
+ static void dw_hdmi_qp_write_infoframe(struct dw_hdmi_qp *hdmi, const u8 *buffer,
+ 				       size_t len, unsigned int reg)
+ {
+ 	size_t i;
+ 
+ 	/* InfoFrame packet header */
+ 	dw_hdmi_qp_write_pkt(hdmi, buffer, 1, 2, reg);
+ 
+ 	/* InfoFrame packet body */
+ 	for (i = 0; i < len - 3; i += 4)
+ 		dw_hdmi_qp_write_pkt(hdmi, buffer + 3, i, min(len - i - 3, 4),
+ 				     reg + i + 4);
+ }
+ 
  static int dw_hdmi_qp_bridge_write_avi_infoframe(struct drm_bridge *bridge,
  						 const u8 *buffer, size_t len)
  {
@@@ -1006,15 -928,27 +928,27 @@@
  
  	dw_hdmi_qp_bridge_clear_avi_infoframe(bridge);
  
- 	return dw_hdmi_qp_config_avi_infoframe(hdmi, buffer, len);
+ 	dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_AVI_CONTENTS0);
+ 
+ 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_AVI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ 	dw_hdmi_qp_mod(hdmi, PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN,
+ 		       PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN, PKTSCHED_PKT_EN);
+ 
+ 	return 0;
  }
  
  static int dw_hdmi_qp_bridge_write_hdmi_infoframe(struct drm_bridge *bridge,
  						  const u8 *buffer, size_t len)
  {
+ 	struct dw_hdmi_qp *hdmi = bridge->driver_private;
+ 
  	dw_hdmi_qp_bridge_clear_hdmi_infoframe(bridge);
  
- 	/* FIXME: add support for the HDMI VSI */
+ 	dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_VSI_CONTENTS0);
+ 
+ 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_VSI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ 	dw_hdmi_qp_mod(hdmi, PKTSCHED_VSI_TX_EN, PKTSCHED_VSI_TX_EN,
+ 		       PKTSCHED_PKT_EN);
  
  	return 0;
  }
@@@ -1026,7 -960,28 +960,28 @@@ static int dw_hdmi_qp_bridge_write_hdr_
  
  	dw_hdmi_qp_bridge_clear_hdr_drm_infoframe(bridge);
  
- 	return dw_hdmi_qp_config_drm_infoframe(hdmi, buffer, len);
+ 	dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_DRMI_CONTENTS0);
+ 
+ 	dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ 	dw_hdmi_qp_mod(hdmi, PKTSCHED_DRMI_TX_EN, PKTSCHED_DRMI_TX_EN,
+ 		       PKTSCHED_PKT_EN);
+ 
+ 	return 0;
+ }
+ 
+ static int dw_hdmi_qp_bridge_write_spd_infoframe(struct drm_bridge *bridge,
+ 						 const u8 *buffer, size_t len)
+ {
+ 	struct dw_hdmi_qp *hdmi = bridge->driver_private;
+ 
+ 	dw_hdmi_qp_bridge_clear_spd_infoframe(bridge);
+ 
+ 	dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_SPDI_CONTENTS0);
+ 
+ 	dw_hdmi_qp_mod(hdmi, PKTSCHED_SPDI_TX_EN, PKTSCHED_SPDI_TX_EN,
+ 		       PKTSCHED_PKT_EN);
+ 
+ 	return 0;
  }
  
  static int dw_hdmi_qp_bridge_write_audio_infoframe(struct drm_bridge *bridge,
@@@ -1036,7 -991,31 +991,31 @@@
  
  	dw_hdmi_qp_bridge_clear_audio_infoframe(bridge);
  
- 	return dw_hdmi_qp_config_audio_infoframe(hdmi, buffer, len);
+ 	/*
+ 	 * AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
+ 	 * AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
+ 	 * AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }
+ 	 *
+ 	 * PB0: CheckSum
+ 	 * PB1: | CT3    | CT2  | CT1  | CT0  | F13  | CC2 | CC1 | CC0 |
+ 	 * PB2: | F27    | F26  | F25  | SF2  | SF1  | SF0 | SS1 | SS0 |
+ 	 * PB3: | F37    | F36  | F35  | F34  | F33  | F32 | F31 | F30 |
+ 	 * PB4: | CA7    | CA6  | CA5  | CA4  | CA3  | CA2 | CA1 | CA0 |
+ 	 * PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
+ 	 * PB6~PB10: Reserved
+ 	 */
+ 	dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_AUDI_CONTENTS0);
+ 
+ 	/* Enable ACR, AUDI, AMD */
+ 	dw_hdmi_qp_mod(hdmi,
+ 		       PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
+ 		       PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
+ 		       PKTSCHED_PKT_EN);
+ 
+ 	/* Enable AUDS */
+ 	dw_hdmi_qp_mod(hdmi, PKTSCHED_AUDS_TX_EN, PKTSCHED_AUDS_TX_EN, PKTSCHED_PKT_EN);
+ 
+ 	return 0;
  }
  
  #ifdef CONFIG_DRM_DW_HDMI_QP_CEC
@@@ -1227,6 -1206,8 +1206,8 @@@ static const struct drm_bridge_funcs dw
  	.hdmi_write_hdmi_infoframe = dw_hdmi_qp_bridge_write_hdmi_infoframe,
  	.hdmi_clear_hdr_drm_infoframe = dw_hdmi_qp_bridge_clear_hdr_drm_infoframe,
  	.hdmi_write_hdr_drm_infoframe = dw_hdmi_qp_bridge_write_hdr_drm_infoframe,
+ 	.hdmi_clear_spd_infoframe = dw_hdmi_qp_bridge_clear_spd_infoframe,
+ 	.hdmi_write_spd_infoframe = dw_hdmi_qp_bridge_write_spd_infoframe,
  	.hdmi_clear_audio_infoframe = dw_hdmi_qp_bridge_clear_audio_infoframe,
  	.hdmi_write_audio_infoframe = dw_hdmi_qp_bridge_write_audio_infoframe,
  	.hdmi_audio_startup = dw_hdmi_qp_audio_enable,
@@@ -1344,7 -1325,8 +1325,8 @@@ struct dw_hdmi_qp *dw_hdmi_qp_bind(stru
  			   DRM_BRIDGE_OP_EDID |
  			   DRM_BRIDGE_OP_HDMI |
  			   DRM_BRIDGE_OP_HDMI_AUDIO |
- 			   DRM_BRIDGE_OP_HDMI_HDR_DRM_INFOFRAME;
+ 			   DRM_BRIDGE_OP_HDMI_HDR_DRM_INFOFRAME |
+ 			   DRM_BRIDGE_OP_HDMI_SPD_INFOFRAME;
  	if (!hdmi->no_hpd)
  		hdmi->bridge.ops |= DRM_BRIDGE_OP_HPD;
  	hdmi->bridge.of_node = pdev->dev.of_node;

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2026-01-05  2:21 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2026-01-05  2:21 UTC (permalink / raw)
  To: Dave Airlie, Simona Vetter
  Cc: Eslam Khafagy, Linus Walleij, DRI, Intel Graphics,
	Linux Kernel Mailing List, Linux Next Mailing List, Miaoqian Lin

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

Hi all,

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

  drivers/gpu/drm/pl111/pl111_drv.c

between commit:

  0ddd3bb4b14c ("drm/pl111: Fix error handling in pl111_amba_probe")

from the drm-misc-fixes tree and commit:

  a1542b8ca6ed ("drm: pl111: replace dev_* print functions with drm_* variants")

from the drm 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/pl111/pl111_drv.c
index d7dc83cf7b00,ac9e4b6bd2eb..000000000000
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@@ -294,8 -295,8 +295,8 @@@ static int pl111_amba_probe(struct amba
  	ret = devm_request_irq(dev, amba_dev->irq[0], pl111_irq, 0,
  			       variant->name, priv);
  	if (ret != 0) {
- 		dev_err(dev, "%s failed irq %d\n", __func__, ret);
+ 		drm_err(drm, "%s failed irq %d\n", __func__, ret);
 -		return ret;
 +		goto dev_put;
  	}
  
  	ret = pl111_modeset_init(drm);

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2025-08-20  1:21 Stephen Rothwell
  2025-08-20 10:30 ` Danilo Krummrich
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2025-08-20  1:21 UTC (permalink / raw)
  To: Dave Airlie, Simona Vetter
  Cc: Beata Michalska, Danilo Krummrich, Miguel Ojeda, DRI,
	Intel Graphics, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

  drivers/gpu/drm/nova/file.rs

between commit:

  db2e7bcee11c ("drm: nova-drm: fix 32-bit arm build")

from the drm-misc-fixes tree and commit:

  94febfb5bcfb ("rust: drm: Drop the use of Opaque for ioctl arguments")

from the drm tree.

I fixed it up (I think - 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/nova/file.rs
index 4fe62cf98a23,7e7d4e2de2fb..000000000000
--- a/drivers/gpu/drm/nova/file.rs
+++ b/drivers/gpu/drm/nova/file.rs
@@@ -39,8 -36,7 +36,8 @@@ impl File 
              _ => return Err(EINVAL),
          };
  
 -        getparam.value = value;
 +        #[allow(clippy::useless_conversion)]
-         getparam.set_value(value.into());
++        getparam.value = value.into();
  
          Ok(0)
      }

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2025-07-18  4:41 Stephen Rothwell
  2025-07-18  6:27 ` Thomas Zimmermann
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2025-07-18  4:41 UTC (permalink / raw)
  To: Dave Airlie, Simona Vetter
  Cc: Intel Graphics, DRI, Dmitry Osipenko, Linux Kernel Mailing List,
	Linux Next Mailing List, Thomas Zimmermann, Vivek Kasireddy

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

Hi all,

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

  drivers/gpu/drm/virtio/virtgpu_prime.c

between commit:

  0ecfb8ddb953 ("Revert "drm/virtio: Use dma_buf from GEM object instance"")

from the drm-misc-fixes tree and commit:

  44b6535d8ace ("drm/virtio: Fix NULL pointer deref in virtgpu_dma_buf_free_obj()")

from the drm tree.

I fixed it up (I used the latter version - reverting the former by hand)
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] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2025-01-14  1:30 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2025-01-14  1:30 UTC (permalink / raw)
  To: Dave Airlie, Simona Vetter
  Cc: Cristian Ciocaltea, Dmitry Baryshkov, Intel Graphics, DRI,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  drivers/gpu/drm/display/drm_bridge_connector.c

between commit:

  1bd1562d3522 ("drm/bridge-connector: Sync supported_formats with computed ycbcr_420_allowed")

from the drm-misc-fixes tree and commit:

  0beba3f9d366 ("drm/bridge: connector: add support for HDMI codec framework")

from the drm 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/display/drm_bridge_connector.c
index 3a5a4f92c979,32108307de66..000000000000
--- a/drivers/gpu/drm/display/drm_bridge_connector.c
+++ b/drivers/gpu/drm/display/drm_bridge_connector.c
@@@ -460,9 -596,8 +596,11 @@@ struct drm_connector *drm_bridge_connec
  		return ERR_PTR(-EINVAL);
  
  	if (bridge_connector->bridge_hdmi) {
 +		if (!connector->ycbcr_420_allowed)
 +			supported_formats &= ~BIT(HDMI_COLORSPACE_YUV420);
 +
+ 		bridge = bridge_connector->bridge_hdmi;
+ 
  		ret = drmm_connector_hdmi_init(drm, connector,
  					       bridge_connector->bridge_hdmi->vendor,
  					       bridge_connector->bridge_hdmi->product,

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2023-11-22  0:29 Stephen Rothwell
  2023-11-28 10:04 ` Geert Uytterhoeven
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2023-11-22  0:29 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Intel Graphics, DRI, Andrzej Kacprowski, Jacek Lawrynowicz,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Stanislaw Gruszka

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

Hi all,

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

  drivers/accel/ivpu/ivpu_hw_37xx.c

between commit:

  3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset")

from the drm-misc-fixes tree and commits:

  3de6d9597892 ("accel/ivpu: Pass D0i3 residency time to the VPU firmware")
  cc19fedab8bd ("accel/ivpu/37xx: Print warning when VPUIP is not idle during power down")

from the drm 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/accel/ivpu/ivpu_hw_37xx.c
index 4ccf1994b97a,4ab1f14cf360..000000000000
--- a/drivers/accel/ivpu/ivpu_hw_37xx.c
+++ b/drivers/accel/ivpu/ivpu_hw_37xx.c
@@@ -720,14 -731,19 +733,14 @@@ static int ivpu_hw_37xx_power_down(stru
  {
  	int ret = 0;
  
- 	if (!ivpu_hw_37xx_is_idle(vdev))
- 		ivpu_warn(vdev, "VPU not idle during power down\n");
+ 	ivpu_hw_37xx_save_d0i3_entry_timestamp(vdev);
  
- 	if (ivpu_hw_37xx_reset(vdev)) {
- 		ivpu_err(vdev, "Failed to reset VPU\n");
- 		ret = -EIO;
+ 	if (!ivpu_hw_37xx_is_idle(vdev)) {
+ 		ivpu_warn(vdev, "VPU not idle during power down\n");
+ 		if (ivpu_hw_37xx_reset(vdev))
+ 			ivpu_warn(vdev, "Failed to reset the VPU\n");
  	}
  
 -	if (ivpu_pll_disable(vdev)) {
 -		ivpu_err(vdev, "Failed to disable PLL\n");
 -		ret = -EIO;
 -	}
 -
  	if (ivpu_hw_37xx_d0i3_enable(vdev)) {
  		ivpu_err(vdev, "Failed to enter D0I3\n");
  		ret = -EIO;

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2023-09-28  2:05 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2023-09-28  2:05 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Intel Graphics, DRI, Jacek Lawrynowicz, Karol Wachowski,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Stanislaw Gruszka

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

Hi all,

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

  drivers/accel/ivpu/ivpu_fw.c

between commit:

  645d694559ca ("accel/ivpu: Use cached buffers for FW loading")

from the drm-misc-fixes tree and commit:

  53d98420f5f9 ("accel/ivpu: Move ivpu_fw_load() to ivpu_fw_init()")

from the drm 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/accel/ivpu/ivpu_fw.c
index 0191cf8e5964,d57e103aae1c..000000000000
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@@ -331,9 -332,7 +333,7 @@@ void ivpu_fw_load(struct ivpu_device *v
  		memset(start, 0, size);
  	}
  
 -	wmb(); /* Flush WC buffers after writing fw->mem */
 +	clflush_cache_range(fw->mem->kvaddr, fw->mem->base.size);
- 
- 	return 0;
  }
  
  static void ivpu_fw_boot_params_print(struct ivpu_device *vdev, struct vpu_boot_params *boot_params)

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2023-06-27  1:54 Stephen Rothwell
  2023-07-11  1:17 ` Stephen Rothwell
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2023-06-27  1:54 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Intel Graphics, DRI, Boris Brezillon, Christian König,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  include/drm/gpu_scheduler.h

between commit:

  db8b4968a8d0 ("drm/sched: Call drm_sched_fence_set_parent() from drm_sched_fence_scheduled()")

from the drm-misc-fixes tree and commit:

  539f9ee4b52a ("drm/scheduler: properly forward fence errors")

from the drm 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/gpu_scheduler.h
index b29e347b10a9,e95b4837e5a3..000000000000
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@@ -581,16 -581,18 +581,17 @@@ void drm_sched_entity_push_job(struct d
  void drm_sched_entity_set_priority(struct drm_sched_entity *entity,
  				   enum drm_sched_priority priority);
  bool drm_sched_entity_is_ready(struct drm_sched_entity *entity);
+ int drm_sched_entity_error(struct drm_sched_entity *entity);
  
 -void drm_sched_fence_set_parent(struct drm_sched_fence *s_fence,
 -				struct dma_fence *fence);
  struct drm_sched_fence *drm_sched_fence_alloc(
  	struct drm_sched_entity *s_entity, void *owner);
  void drm_sched_fence_init(struct drm_sched_fence *fence,
  			  struct drm_sched_entity *entity);
  void drm_sched_fence_free(struct drm_sched_fence *fence);
  
 -void drm_sched_fence_scheduled(struct drm_sched_fence *fence);
 +void drm_sched_fence_scheduled(struct drm_sched_fence *fence,
 +			       struct dma_fence *parent);
- void drm_sched_fence_finished(struct drm_sched_fence *fence);
+ void drm_sched_fence_finished(struct drm_sched_fence *fence, int result);
  
  unsigned long drm_sched_suspend_timeout(struct drm_gpu_scheduler *sched);
  void drm_sched_resume_timeout(struct drm_gpu_scheduler *sched,

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2022-11-21  2:06 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2022-11-21  2:06 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Intel Graphics, DRI, Christian König,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

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

between commit:

  b09d6acba1d9 ("drm/amdgpu: handle gang submit before VMID")

from the drm-misc-fixes tree and commits:

  c5093cddf56b ("drm/amdgpu: drop the fence argument from amdgpu_vmid_grab")
  940ca22b7ea9 ("drm/amdgpu: drop amdgpu_sync from amdgpu_vmid_grab v2")
  1b2d5eda5ad7 ("drm/amdgpu: move explicit sync check into the CS")
  1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm 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_job.c
index abb99cff8b4b,032651a655f0..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@@ -243,30 -242,18 +242,18 @@@ amdgpu_job_prepare_job(struct drm_sched
  {
  	struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->rq->sched);
  	struct amdgpu_job *job = to_amdgpu_job(sched_job);
- 	struct amdgpu_vm *vm = job->vm;
- 	struct dma_fence *fence;
+ 	struct dma_fence *fence = NULL;
  	int r;
  
- 	fence = amdgpu_sync_get_fence(&job->sync);
- 	if (fence && drm_sched_dependency_optimized(fence, s_entity)) {
- 		r = amdgpu_sync_fence(&job->sched_sync, fence);
- 		if (r)
- 			DRM_ERROR("Error adding fence (%d)\n", r);
- 	}
- 
- 	if (!fence && job->gang_submit)
++	if (job->gang_submit)
 +		fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
 +
- 	while (fence == NULL && vm && !job->vmid) {
- 		r = amdgpu_vmid_grab(vm, ring, &job->sync,
- 				     &job->base.s_fence->finished,
- 				     job);
+ 	while (!fence && job->vm && !job->vmid) {
+ 		r = amdgpu_vmid_grab(job->vm, ring, job, &fence);
  		if (r)
  			DRM_ERROR("Error getting VM ID (%d)\n", r);
- 
- 		fence = amdgpu_sync_get_fence(&job->sync);
  	}
  
 -	if (!fence && job->gang_submit)
 -		fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
 -
  	return fence;
  }
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2022-07-11  2:47 Stephen Rothwell
  2022-07-11  8:05 ` Christian König
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2022-07-11  2:47 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter
  Cc: Intel Graphics, DRI, Arunpravin Paneer Selvam,
	Christian König, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

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

between commit:

  925b6e59138c ("Revert "drm/amdgpu: add drm buddy support to amdgpu"")

from the drm-misc-fixes tree and commit:

  5e3f1e7729ec ("drm/amdgpu: fix start calculation in amdgpu_vram_mgr_new")

from the drm tree.

This is a mess :-(  I have just reverted the above revert before mergin
the drm tree for today, please fix it up.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2022-03-18  0:55 Stephen Rothwell
  2022-03-18  1:06 ` Stephen Rothwell
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2022-03-18  0:55 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics
  Cc: DRI, Julian Braha, Linux Kernel Mailing List,
	Linux Next Mailing List, Robert Foss, Thomas Zimmermann

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

Hi all,

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

  drivers/gpu/drm/bridge/Kconfig

between commit:

  3c3384050d68 ("drm: Don't make DRM_PANEL_BRIDGE dependent on DRM_KMS_HELPERS")

from the drm-misc-fixes tree and commit:

  803abfd8dda5 ("drm: bridge: fix unmet dependency on DRM_KMS_HELPER for DRM_PANEL_BRIDGE")

from the drm tree.

I fixed it up (I just used the latter) 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] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2021-12-22  3:50 Stephen Rothwell
  2021-12-22  7:31 ` Christian König
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2021-12-22  3:50 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Christian König, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  drivers/gpu/drm/nouveau/nouveau_fence.c

between commit:

  67f74302f45d ("drm/nouveau: wait for the exclusive fence after the shared ones v2")

from the drm-misc-fixes tree and commit:

  40298cb45071 ("drm/nouveau: use the new iterator in nouveau_fence_sync")

from the drm 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] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2021-11-29 23:33 Stephen Rothwell
  2021-11-30  8:58 ` Maxime Ripard
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2021-11-29 23:33 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Maxime Ripard

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

Hi all,

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

  drivers/gpu/drm/vc4/vc4_kms.c

between commits:

  f927767978d2 ("drm/vc4: kms: Fix return code check")
  d354699e2292 ("drm/vc4: kms: Don't duplicate pending commit")

from the drm-misc-fixes tree and commit:

  16e101051f32 ("drm/vc4: Increase the core clock based on HVS load")

from the drm 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_kms.c
index b61792d2aa65,79d4d9dd1394..000000000000
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@@ -337,12 -340,21 +340,21 @@@ static void vc4_atomic_commit_tail(stru
  	struct drm_device *dev = state->dev;
  	struct vc4_dev *vc4 = to_vc4_dev(dev);
  	struct vc4_hvs *hvs = vc4->hvs;
 -	struct drm_crtc_state *old_crtc_state;
  	struct drm_crtc_state *new_crtc_state;
+ 	struct vc4_hvs_state *new_hvs_state;
  	struct drm_crtc *crtc;
  	struct vc4_hvs_state *old_hvs_state;
 +	unsigned int channel;
  	int i;
  
+ 	old_hvs_state = vc4_hvs_get_old_global_state(state);
 -	if (WARN_ON(!old_hvs_state))
++	if (WARN_ON(IS_ERR(old_hvs_state)))
+ 		return;
+ 
+ 	new_hvs_state = vc4_hvs_get_new_global_state(state);
 -	if (WARN_ON(!new_hvs_state))
++	if (WARN_ON(IS_ERR(new_hvs_state)))
+ 		return;
+ 
  	for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
  		struct vc4_crtc_state *vc4_crtc_state;
  
@@@ -353,32 -365,31 +365,36 @@@
  		vc4_hvs_mask_underrun(dev, vc4_crtc_state->assigned_channel);
  	}
  
- 	old_hvs_state = vc4_hvs_get_old_global_state(state);
- 	if (IS_ERR(old_hvs_state))
- 		return;
+ 	if (vc4->hvs->hvs5) {
+ 		unsigned long core_rate = max_t(unsigned long,
+ 						500000000,
+ 						new_hvs_state->core_clock_rate);
+ 
+ 		clk_set_min_rate(hvs->core_clk, core_rate);
+ 	}
  
 -	for_each_old_crtc_in_state(state, crtc, old_crtc_state, i) {
 -		struct vc4_crtc_state *vc4_crtc_state =
 -			to_vc4_crtc_state(old_crtc_state);
 -		unsigned int channel = vc4_crtc_state->assigned_channel;
 +	for (channel = 0; channel < HVS_NUM_CHANNELS; channel++) {
 +		struct drm_crtc_commit *commit;
  		int ret;
  
 -		if (channel == VC4_HVS_CHANNEL_DISABLED)
 +		if (!old_hvs_state->fifo_state[channel].in_use)
  			continue;
  
 -		if (!old_hvs_state->fifo_state[channel].in_use)
 +		commit = old_hvs_state->fifo_state[channel].pending_commit;
 +		if (!commit)
  			continue;
  
 -		ret = drm_crtc_commit_wait(old_hvs_state->fifo_state[channel].pending_commit);
 +		ret = drm_crtc_commit_wait(commit);
  		if (ret)
  			drm_err(dev, "Timed out waiting for commit\n");
 +
 +		drm_crtc_commit_put(commit);
 +		old_hvs_state->fifo_state[channel].pending_commit = NULL;
  	}
  
 +	if (vc4->hvs->hvs5)
 +		clk_set_min_rate(hvs->core_clk, 500000000);
 +
  	drm_atomic_helper_commit_modeset_disables(dev, state);
  
  	vc4_ctm_commit(vc4, state);
@@@ -667,11 -673,19 +678,13 @@@ vc4_hvs_channels_duplicate_state(struc
  
  	__drm_atomic_helper_private_obj_duplicate_state(obj, &state->base);
  
- 
  	for (i = 0; i < HVS_NUM_CHANNELS; i++) {
  		state->fifo_state[i].in_use = old_state->fifo_state[i].in_use;
+ 		state->fifo_state[i].fifo_load = old_state->fifo_state[i].fifo_load;
 -
 -		if (!old_state->fifo_state[i].pending_commit)
 -			continue;
 -
 -		state->fifo_state[i].pending_commit =
 -			drm_crtc_commit_get(old_state->fifo_state[i].pending_commit);
  	}
  
+ 	state->core_clock_rate = old_state->core_clock_rate;
+ 
  	return &state->base;
  }
  
@@@ -826,6 -840,76 +839,76 @@@ static int vc4_pv_muxing_atomic_check(s
  	return 0;
  }
  
+ static int
+ vc4_core_clock_atomic_check(struct drm_atomic_state *state)
+ {
+ 	struct vc4_dev *vc4 = to_vc4_dev(state->dev);
+ 	struct drm_private_state *priv_state;
+ 	struct vc4_hvs_state *hvs_new_state;
+ 	struct vc4_load_tracker_state *load_state;
+ 	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
+ 	struct drm_crtc *crtc;
+ 	unsigned int num_outputs;
+ 	unsigned long pixel_rate;
+ 	unsigned long cob_rate;
+ 	unsigned int i;
+ 
+ 	priv_state = drm_atomic_get_private_obj_state(state,
+ 						      &vc4->load_tracker);
+ 	if (IS_ERR(priv_state))
+ 		return PTR_ERR(priv_state);
+ 
+ 	load_state = to_vc4_load_tracker_state(priv_state);
+ 
+ 	hvs_new_state = vc4_hvs_get_global_state(state);
 -	if (!hvs_new_state)
 -		return -EINVAL;
++	if (IS_ERR(hvs_new_state))
++		return PTR_ERR(hvs_new_state);
+ 
+ 	for_each_oldnew_crtc_in_state(state, crtc,
+ 				      old_crtc_state,
+ 				      new_crtc_state,
+ 				      i) {
+ 		if (old_crtc_state->active) {
+ 			struct vc4_crtc_state *old_vc4_state =
+ 				to_vc4_crtc_state(old_crtc_state);
+ 			unsigned int channel = old_vc4_state->assigned_channel;
+ 
+ 			hvs_new_state->fifo_state[channel].fifo_load = 0;
+ 		}
+ 
+ 		if (new_crtc_state->active) {
+ 			struct vc4_crtc_state *new_vc4_state =
+ 				to_vc4_crtc_state(new_crtc_state);
+ 			unsigned int channel = new_vc4_state->assigned_channel;
+ 
+ 			hvs_new_state->fifo_state[channel].fifo_load =
+ 				new_vc4_state->hvs_load;
+ 		}
+ 	}
+ 
+ 	cob_rate = 0;
+ 	num_outputs = 0;
+ 	for (i = 0; i < HVS_NUM_CHANNELS; i++) {
+ 		if (!hvs_new_state->fifo_state[i].in_use)
+ 			continue;
+ 
+ 		num_outputs++;
+ 		cob_rate += hvs_new_state->fifo_state[i].fifo_load;
+ 	}
+ 
+ 	pixel_rate = load_state->hvs_load;
+ 	if (num_outputs > 1) {
+ 		pixel_rate = (pixel_rate * 40) / 100;
+ 	} else {
+ 		pixel_rate = (pixel_rate * 60) / 100;
+ 	}
+ 
+ 	hvs_new_state->core_clock_rate = max(cob_rate, pixel_rate);
+ 
+ 	return 0;
+ }
+ 
+ 
  static int
  vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
  {

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2021-10-22  0:53 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2021-10-22  0:53 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Bryant Mairs, Hans de Goede, Linux Kernel Mailing List,
	Linux Next Mailing List, Sam Ravnborg

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

Hi all,

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

  drivers/gpu/drm/drm_panel_orientation_quirks.c

between commit:

  def0c3697287 ("drm: panel-orientation-quirks: Add quirk for Aya Neo 2021")

from the drm-misc-fixes tree and commits:

  072e70d52372 ("drm: panel-orientation-quirks: Add quirk for the Chuwi Hi10 Pro")
  63a4881572d7 ("drm: panel-orientation-quirks: Add quirk for the Chuwi HiBook")

from the drm 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_panel_orientation_quirks.c
index 30c17a76f49a,62e8ccc7ab9c..000000000000
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@@ -134,12 -140,20 +140,26 @@@ static const struct dmi_system_id orien
  		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
  		},
  		.driver_data = (void *)&lcd800x1280_rightside_up,
 +	}, {	/* AYA NEO 2021 */
 +		.matches = {
 +		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYADEVICE"),
 +		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
 +		},
 +		.driver_data = (void *)&lcd800x1280_rightside_up,
+ 	}, {	/* Chuwi HiBook (CWI514) */
+ 		.matches = {
+ 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
+ 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+ 			/* Above matches are too generic, add bios-date match */
+ 			DMI_MATCH(DMI_BIOS_DATE, "05/07/2016"),
+ 		},
+ 		.driver_data = (void *)&lcd1200x1920_rightside_up,
+ 	}, {	/* Chuwi Hi10 Pro (CWI529) */
+ 		.matches = {
+ 		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
+ 		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Hi10 pro tablet"),
+ 		},
+ 		.driver_data = (void *)&lcd1200x1920_rightside_up,
  	}, {	/* GPD MicroPC (generic strings, also match on bios date) */
  		.matches = {
  		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2021-06-17  1:42 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2021-06-17  1:42 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Maxime Ripard

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

Hi all,

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

  drivers/gpu/drm/vc4/vc4_hdmi.c

between commit:

  9984d6664ce9 ("drm/vc4: hdmi: Make sure the controller is powered in detect")

from the drm-misc-fixes tree and commit:

  6800234ceee0 ("drm/vc4: hdmi: Convert to gpiod")

from the drm 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_hdmi.c
index 8106b5634fe1,3c4cc133e3df..000000000000
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@@ -159,12 -166,9 +166,11 @@@ vc4_hdmi_connector_detect(struct drm_co
  	struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
  	bool connected = false;
  
 +	WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev));
 +
- 	if (vc4_hdmi->hpd_gpio) {
- 		if (gpio_get_value_cansleep(vc4_hdmi->hpd_gpio) ^
- 		    vc4_hdmi->hpd_active_low)
- 			connected = true;
+ 	if (vc4_hdmi->hpd_gpio &&
+ 	    gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) {
+ 		connected = true;
  	} else if (drm_probe_ddc(vc4_hdmi->ddc)) {
  		connected = true;
  	} else if (HDMI_READ(HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED) {
@@@ -787,16 -942,26 +945,18 @@@ static void vc4_hdmi_encoder_pre_crtc_c
  		return;
  	}
  
 -	ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
 -	if (ret) {
 -		DRM_ERROR("Failed to turn on HSM clock: %d\n", ret);
 -		clk_disable_unprepare(vc4_hdmi->pixel_clock);
 -		return;
 -	}
 -
  	vc4_hdmi_cec_update_clk_div(vc4_hdmi);
  
- 	/*
- 	 * FIXME: When the pixel freq is 594MHz (4k60), this needs to be setup
- 	 * at 300MHz.
- 	 */
- 	ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock,
- 			       (hsm_rate > VC4_HSM_MID_CLOCK ? 150000000 : 75000000));
+ 	if (pixel_rate > 297000000)
+ 		bvb_rate = 300000000;
+ 	else if (pixel_rate > 148500000)
+ 		bvb_rate = 150000000;
+ 	else
+ 		bvb_rate = 75000000;
+ 
+ 	ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, bvb_rate);
  	if (ret) {
  		DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret);
 -		clk_disable_unprepare(vc4_hdmi->hsm_clock);
  		clk_disable_unprepare(vc4_hdmi->pixel_clock);
  		return;
  	}

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

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

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

Hi all,

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

  drivers/gpu/drm/vc4/vc4_plane.c

between commit:

  35d65ab3fdba ("drm/vc4: plane: Remove redundant assignment")

from the drm-misc-fixes tree and commit:

  5ddb0bd4ddc3 ("drm/atomic: Pass the full state to planes async atomic check and update")

from the drm 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_plane.c
index 1e9c84cf614a,c76e73a452e0..000000000000
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@@ -1133,31 -1135,34 +1135,33 @@@ void vc4_plane_async_set_fb(struct drm_
  }
  
  static void vc4_plane_atomic_async_update(struct drm_plane *plane,
- 					  struct drm_plane_state *state)
+ 					  struct drm_atomic_state *state)
  {
+ 	struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
+ 										 plane);
  	struct vc4_plane_state *vc4_state, *new_vc4_state;
  
- 	swap(plane->state->fb, state->fb);
- 	plane->state->crtc_x = state->crtc_x;
- 	plane->state->crtc_y = state->crtc_y;
- 	plane->state->crtc_w = state->crtc_w;
- 	plane->state->crtc_h = state->crtc_h;
- 	plane->state->src_x = state->src_x;
- 	plane->state->src_y = state->src_y;
- 	plane->state->src_w = state->src_w;
- 	plane->state->src_h = state->src_h;
- 	plane->state->alpha = state->alpha;
- 	plane->state->pixel_blend_mode = state->pixel_blend_mode;
- 	plane->state->rotation = state->rotation;
- 	plane->state->zpos = state->zpos;
- 	plane->state->normalized_zpos = state->normalized_zpos;
- 	plane->state->color_encoding = state->color_encoding;
- 	plane->state->color_range = state->color_range;
- 	plane->state->src = state->src;
- 	plane->state->dst = state->dst;
- 	plane->state->visible = state->visible;
- 
- 	new_vc4_state = to_vc4_plane_state(state);
+ 	swap(plane->state->fb, new_plane_state->fb);
+ 	plane->state->crtc_x = new_plane_state->crtc_x;
+ 	plane->state->crtc_y = new_plane_state->crtc_y;
+ 	plane->state->crtc_w = new_plane_state->crtc_w;
+ 	plane->state->crtc_h = new_plane_state->crtc_h;
+ 	plane->state->src_x = new_plane_state->src_x;
+ 	plane->state->src_y = new_plane_state->src_y;
+ 	plane->state->src_w = new_plane_state->src_w;
+ 	plane->state->src_h = new_plane_state->src_h;
 -	plane->state->src_h = new_plane_state->src_h;
+ 	plane->state->alpha = new_plane_state->alpha;
+ 	plane->state->pixel_blend_mode = new_plane_state->pixel_blend_mode;
+ 	plane->state->rotation = new_plane_state->rotation;
+ 	plane->state->zpos = new_plane_state->zpos;
+ 	plane->state->normalized_zpos = new_plane_state->normalized_zpos;
+ 	plane->state->color_encoding = new_plane_state->color_encoding;
+ 	plane->state->color_range = new_plane_state->color_range;
+ 	plane->state->src = new_plane_state->src;
+ 	plane->state->dst = new_plane_state->dst;
+ 	plane->state->visible = new_plane_state->visible;
+ 
+ 	new_vc4_state = to_vc4_plane_state(new_plane_state);
  	vc4_state = to_vc4_plane_state(plane->state);
  
  	vc4_state->crtc_x = new_vc4_state->crtc_x;

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2021-03-18  1:02 Stephen Rothwell
  2021-03-18  6:51 ` Tomi Valkeinen
  0 siblings, 1 reply; 62+ messages in thread
From: Stephen Rothwell @ 2021-03-18  1:02 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Junlin Yang, Linux Kernel Mailing List, Linux Next Mailing List,
	Menglong Dong, Tomi Valkeinen

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

Hi all,

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

  drivers/gpu/drm/omapdrm/dss/dsi.c

between commit:

  690911544275 ("drm/omap: dsi: fix unsigned expression compared with zero")

from the drm-misc-fixes tree and commit:

  bbd13d6a7b2e ("drm/omap: dsi: fix unreachable code in dsi_vc_send_short()")

from the drm tree.

I fixed it up (these do basically the same thing, so I used the former
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] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2020-07-28  3:41 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2020-07-28  3:41 UTC (permalink / raw)
  To: Dave Airlie, DRI, Daniel Vetter, Intel Graphics
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Steve Cohen,
	Emil Velikov

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

Hi all,

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

  drivers/gpu/drm/drm_gem.c

between commit:

  8490d6a7e0a0 ("drm: hold gem reference until object is no longer accessed")

from the drm-misc-fixes tree and commit:

  be6ee102341b ("drm: remove _unlocked suffix in drm_gem_object_put_unlocked")

from the drm 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 ee2058ad482c,a57f5379fc08..000000000000
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@@ -901,9 -913,7 +909,9 @@@ drm_gem_open_ioctl(struct drm_device *d
  	args->handle = handle;
  	args->size = obj->size;
  
 -	return 0;
 +err:
- 	drm_gem_object_put_unlocked(obj);
++	drm_gem_object_put(obj);
 +	return ret;
  }
  
  /**

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2020-05-01  3:45 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2020-05-01  3:45 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Randy Dunlap,
	Sumit Semwal, Christian König

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

Hi all,

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

  include/linux/dma-buf.h

between commit:

  6f49c2515e22 ("dma-buf: fix documentation build warnings")

from the drm-misc-fixes tree and commit:

  09606b5446c2 ("dma-buf: add peer2peer flag")

from the drm 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/linux/dma-buf.h
index 57bcef6f988a,82e0a4a64601..000000000000
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@@ -333,8 -334,16 +333,16 @@@ struct dma_buf 
   * Attachment operations implemented by the importer.
   */
  struct dma_buf_attach_ops {
+ 	/**
+ 	 * @allow_peer2peer:
+ 	 *
+ 	 * If this is set to true the importer must be able to handle peer
+ 	 * resources without struct pages.
+ 	 */
+ 	bool allow_peer2peer;
+ 
  	/**
 -	 * @move_notify
 +	 * @move_notify: [optional] notification that the DMA-buf is moving
  	 *
  	 * If this callback is provided the framework can avoid pinning the
  	 * backing store while mappings exists.

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2020-03-01 23:43 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2020-03-01 23:43 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Gerd Hoffmann, Gurchetan Singh

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

Hi all,

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

  drivers/gpu/drm/virtio/virtgpu_object.c

between commit:

  6be7e0733548 ("drm/virtio: fix mmap page attributes")

from the drm-misc-fixes tree and commit:

  18b39fb975b7 ("drm/virtio: add virtio_gpu_is_shmem helper")

from the drm 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/virtio/virtgpu_object.c
index 3af7ec80c7da,c5cad949eb8d..000000000000
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@@ -98,8 -123,7 +123,8 @@@ struct drm_gem_object *virtio_gpu_creat
  	if (!bo)
  		return NULL;
  
- 	bo->base.base.funcs = &virtio_gpu_gem_funcs;
+ 	bo->base.base.funcs = &virtio_gpu_shmem_funcs;
 +	bo->base.map_cached = true;
  	return &bo->base.base;
  }
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2019-09-15 21:18 Mark Brown
  2019-09-16  5:29 ` Vasily Khoruzhick
  0 siblings, 1 reply; 62+ messages in thread
From: Mark Brown @ 2019-09-15 21:18 UTC (permalink / raw)
  To: Vasily Khoruzhick, Qiang Yu, Christian König, Chris Wilson,
	Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

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

  drivers/gpu/drm/lima/lima_gem.c

between commit:

  21670bd78a25001cf8e ("drm/lima: fix lima_gem_wait() return value")

from the drm-misc-fixes tree and commit:

  52791eeec1d9f4a7e7f ("dma-buf: rename reservation_object to dma_resv")

from the drm 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.

diff --cc drivers/gpu/drm/lima/lima_gem.c
index b609dc030d6ca,ff3d9acc24fcf..0000000000000
--- a/drivers/gpu/drm/lima/lima_gem.c
+++ b/drivers/gpu/drm/lima/lima_gem.c
@@@ -341,8 -341,8 +341,8 @@@ int lima_gem_wait(struct drm_file *file
  
  	timeout = drm_timeout_abs_to_jiffies(timeout_ns);
  
- 	ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
+ 	ret = drm_gem_dma_resv_wait(file, handle, write, timeout);
 -	if (ret == 0)
 +	if (ret == -ETIME)
  		ret = timeout ? -ETIMEDOUT : -EBUSY;
  
  	return ret;

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2018-11-26  2:37 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2018-11-26  2:37 UTC (permalink / raw)
  To: Dave Airlie, DRI, Daniel Vetter, Intel Graphics
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Neil Armstrong, Lyude Paul

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

Hi all,

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

  drivers/gpu/drm/meson/meson_crtc.c

between commit:

  47ebfb6ed13e ("drm/meson: Fixes for drm_crtc_vblank_on/off support")

from the drm-misc-fixes tree and commit:

  f9a2348196d1 ("drm/meson: Support Overlay plane for video rendering")

from the drm 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/meson/meson_crtc.c
index 191b314f9e9e,d78168f979db..000000000000
--- a/drivers/gpu/drm/meson/meson_crtc.c
+++ b/drivers/gpu/drm/meson/meson_crtc.c
@@@ -126,8 -115,8 +131,10 @@@ static void meson_crtc_atomic_disable(s
  	struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
  	struct meson_drm *priv = meson_crtc->priv;
  
+ 	DRM_DEBUG_DRIVER("\n");
+ 
 +	drm_crtc_vblank_off(crtc);
 +
  	priv->viu.osd1_enabled = false;
  	priv->viu.osd1_commit = false;
  

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2018-03-08  0:47 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2018-03-08  0:47 UTC (permalink / raw)
  To: Dave Airlie, DRI, Daniel Vetter, Intel Graphics
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Jernej Skrabec, Maxime Ripard

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

Hi all,

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

  drivers/gpu/drm/sun4i/sun4i_tcon.c

between commit:

  e742a17cd360 ("drm/sun4i: tcon: Reduce the scope of the LVDS error a bit")

from the drm-misc-fixes tree and commit:

  34d698f6e349 ("drm/sun4i: Add has_channel_0 TCON quirk")

from the drm 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/sun4i/sun4i_tcon.c
index 2de586b7c98b,0d6c5ed44795..000000000000
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@@ -1143,11 -1155,15 +1164,16 @@@ static const struct sun4i_tcon_quirks s
  };
  
  static const struct sun4i_tcon_quirks sun8i_a83t_lcd_quirks = {
+ 	.has_channel_0		= true,
 +	.supports_lvds		= true,
  };
  
+ static const struct sun4i_tcon_quirks sun8i_a83t_tv_quirks = {
+ 	.has_channel_1		= true,
+ };
+ 
  static const struct sun4i_tcon_quirks sun8i_v3s_quirks = {
- 	/* nothing is supported */
+ 	.has_channel_0		= true,
  };
  
  /* sun4i_drv uses this list to check if a device node is a TCON */

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

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2017-12-13 23:59 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2017-12-13 23:59 UTC (permalink / raw)
  To: Dave Airlie, DRI, Daniel Vetter, Intel Graphics
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Keith Packard, Jani Nikula

Hi all,

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

  drivers/gpu/drm/drm_edid.c

between commit:

  4b4df570b41d ("drm: Update edid-derived drm_display_info fields at edid property set [v2]")

from the drm-misc-fixes tree and commit:

  c945b8c14bb7 ("drm/edid: build ELD in drm_add_edid_modes()")

from the drm 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_edid.c
index cb487148359a,524eace3d460..000000000000
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@@ -4653,6 -4645,10 +4671,8 @@@ int drm_add_edid_modes(struct drm_conne
  		return 0;
  	}
  
 -	quirks = edid_get_quirks(edid);
 -
+ 	drm_edid_to_eld(connector, edid);
+ 
  	/*
  	 * CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
  	 * To avoid multiple parsing of same block, lets parse that map

^ permalink raw reply	[flat|nested] 62+ messages in thread
* linux-next: manual merge of the drm tree with the drm-misc-fixes tree
@ 2017-01-17  0:59 Stephen Rothwell
  0 siblings, 0 replies; 62+ messages in thread
From: Stephen Rothwell @ 2017-01-17  0:59 UTC (permalink / raw)
  To: Dave Airlie, Daniel Vetter, Intel Graphics, DRI
  Cc: linux-next, linux-kernel, Gustavo Padovan, Maarten Lankhorst

Hi Dave,

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

  include/drm/drm_atomic.h

between commit:

  7e9081c5aac7 ("drm/fence: fix memory overwrite when setting out_fence fd")

from the drm-misc-fixes tree and commit:

  bdc571464c49 ("drm/atomic: Clean up wait_for_vblanks, v2.")

from the drm 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_atomic.h
index 56814e8ae7ea,f96220ed4004..000000000000
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@@ -144,7 -144,8 +144,8 @@@ struct __drm_crtcs_state 
  	struct drm_crtc *ptr;
  	struct drm_crtc_state *state;
  	struct drm_crtc_commit *commit;
 -	s64 __user *out_fence_ptr;
 +	s32 __user *out_fence_ptr;
+ 	unsigned last_vblank_count;
  };
  
  struct __drm_connnectors_state {

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

end of thread, other threads:[~2026-10-20  9:52 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26  3:06 linux-next: manual merge of the drm tree with the drm-misc-fixes tree Stephen Rothwell
2019-08-29 10:11 ` james qian wang (Arm Technology China)
  -- strict thread matches above, loose matches on Subject: below --
2026-10-19 16:10 Mark Brown
2026-10-19 19:09 ` Devin Wittmayer
2026-10-20  9:52   ` Mark Brown
2026-10-20  7:30 ` Jocelyn Falempe
2026-09-28 14:15 Mark Brown
2026-09-18 11:14 Mark Brown
2026-09-18 11:14 Mark Brown
2026-08-12 15:45 Mark Brown
2026-08-12 12:20 Mark Brown
2026-06-11 13:54 Mark Brown
2026-06-16  9:16 ` Geert Uytterhoeven
2026-03-20 14:17 Mark Brown
2026-03-20 15:39 ` Boris Brezillon
2026-04-08 17:26   ` Mark Brown
2026-04-09  7:47     ` Boris Brezillon
2026-03-18 14:36 Mark Brown
2026-03-18 15:49 ` Luca Ceresoli
2026-03-18 18:20   ` Cristian Ciocaltea
2026-01-05  2:21 Stephen Rothwell
2025-08-20  1:21 Stephen Rothwell
2025-08-20 10:30 ` Danilo Krummrich
2025-08-20 21:29   ` Stephen Rothwell
2025-07-18  4:41 Stephen Rothwell
2025-07-18  6:27 ` Thomas Zimmermann
2025-01-14  1:30 Stephen Rothwell
2023-11-22  0:29 Stephen Rothwell
2023-11-28 10:04 ` Geert Uytterhoeven
2023-09-28  2:05 Stephen Rothwell
2023-06-27  1:54 Stephen Rothwell
2023-07-11  1:17 ` Stephen Rothwell
2022-11-21  2:06 Stephen Rothwell
2022-07-11  2:47 Stephen Rothwell
2022-07-11  8:05 ` Christian König
2022-07-17 23:44   ` Stephen Rothwell
2022-07-19  7:35     ` Geert Uytterhoeven
2022-07-27  2:55     ` Stephen Rothwell
2022-07-27  3:24       ` Dave Airlie
2022-07-27  5:37         ` Stephen Rothwell
2022-03-18  0:55 Stephen Rothwell
2022-03-18  1:06 ` Stephen Rothwell
2021-12-22  3:50 Stephen Rothwell
2021-12-22  7:31 ` Christian König
2021-11-29 23:33 Stephen Rothwell
2021-11-30  8:58 ` Maxime Ripard
2021-11-30 20:35   ` Stephen Rothwell
2021-10-22  0:53 Stephen Rothwell
2021-06-17  1:42 Stephen Rothwell
2021-04-09  3:12 Stephen Rothwell
2021-03-18  1:02 Stephen Rothwell
2021-03-18  6:51 ` Tomi Valkeinen
2020-07-28  3:41 Stephen Rothwell
2020-05-01  3:45 Stephen Rothwell
2020-03-01 23:43 Stephen Rothwell
2019-09-15 21:18 Mark Brown
2019-09-16  5:29 ` Vasily Khoruzhick
2019-09-17  2:43   ` Qiang Yu
2018-11-26  2:37 Stephen Rothwell
2018-03-08  0:47 Stephen Rothwell
2017-12-13 23:59 Stephen Rothwell
2017-01-17  0:59 Stephen Rothwell

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

all inboxes | Powered by JetHome®