From: Stephen Rothwell <sfr@canb.auug.org.au> To: Daniel Vetter <daniel.vetter@ffwll.ch>, <intel-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>, Dave Airlie <airlied@linux.ie> Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Roper <matthew.d.roper@intel.com>, Rob Clark <robdclark@gmail.com> Subject: linux-next: build failure after merge of the drm-intel tree Date: Thu, 3 Apr 2014 12:24:35 +1100 [thread overview] Message-ID: <20140403122435.4b64cda2d046e52c9e6dae57@canb.auug.org.au> (raw) [-- Attachment #1: Type: text/plain, Size: 28546 bytes --] Hi all, After merging the drm-intel tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/i915/intel_display.c: In function 'intel_alloc_plane_obj': drivers/gpu/drm/i915/intel_display.c:2089:27: error: 'struct drm_crtc' has no member named 'fb' obj->stride = crtc->base.fb->pitches[0]; ^ drivers/gpu/drm/i915/intel_display.c:2092:36: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.pixel_format = crtc->base.fb->pixel_format; ^ drivers/gpu/drm/i915/intel_display.c:2093:29: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.width = crtc->base.fb->width; ^ drivers/gpu/drm/i915/intel_display.c:2094:30: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.height = crtc->base.fb->height; ^ drivers/gpu/drm/i915/intel_display.c:2095:34: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.pitches[0] = crtc->base.fb->pitches[0]; ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:2099:65: error: 'struct drm_crtc' has no member named 'fb' if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:2099:34: note: in expansion of macro 'to_intel_framebuffer' if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), ^ drivers/gpu/drm/i915/intel_display.c: In function 'intel_find_plane_obj': drivers/gpu/drm/i915/intel_display.c:2124:23: error: 'struct drm_crtc' has no member named 'fb' if (!intel_crtc->base.fb) ^ drivers/gpu/drm/i915/intel_display.c:2130:24: error: 'struct drm_crtc' has no member named 'fb' kfree(intel_crtc->base.fb); ^ drivers/gpu/drm/i915/intel_display.c:2131:18: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = NULL; ^ drivers/gpu/drm/i915/intel_display.c:2143:23: error: 'struct drm_crtc' has no member named 'fb' if (!i->active || !c->fb) ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:2146:30: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(c->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:2146:8: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:2148:31: error: 'struct drm_crtc' has no member named 'fb' drm_framebuffer_reference(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:2149:20: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = c->fb; ^ drivers/gpu/drm/i915/intel_display.c:2149:27: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = c->fb; ^ drivers/gpu/drm/i915/intel_display.c: In function 'i9xx_get_plane_config': drivers/gpu/drm/i915/intel_display.c:5745:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); ^ drivers/gpu/drm/i915/intel_display.c:5746:17: error: 'struct drm_crtc' has no member named 'fb' if (!crtc->base.fb) { ^ drivers/gpu/drm/i915/intel_display.c:5759:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pixel_format = fourcc; ^ drivers/gpu/drm/i915/intel_display.c:5760:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel = ^ drivers/gpu/drm/i915/intel_display.c:5775:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:5776:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:5779:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0] = val & 0xffffff80; ^ drivers/gpu/drm/i915/intel_display.c:5781:53: error: 'struct drm_crtc' has no member named 'fb' aligned_height = intel_align_height(dev, crtc->base.fb->height, ^ In file included from include/linux/cache.h:4:0, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:41: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:58: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ In file included from drivers/gpu/drm/i915/intel_display.c:35:0: drivers/gpu/drm/i915/intel_display.c:5788:32: error: 'struct drm_crtc' has no member named 'fb' pipe, plane, crtc->base.fb->width, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5789:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5790:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel, base, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5791:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0], ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c: In function 'ironlake_get_plane_config': drivers/gpu/drm/i915/intel_display.c:6753:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); ^ drivers/gpu/drm/i915/intel_display.c:6754:17: error: 'struct drm_crtc' has no member named 'fb' if (!crtc->base.fb) { ^ drivers/gpu/drm/i915/intel_display.c:6767:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pixel_format = fourcc; ^ drivers/gpu/drm/i915/intel_display.c:6768:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel = ^ drivers/gpu/drm/i915/intel_display.c:6783:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:6784:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:6787:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0] = val & 0xffffff80; ^ drivers/gpu/drm/i915/intel_display.c:6789:53: error: 'struct drm_crtc' has no member named 'fb' aligned_height = intel_align_height(dev, crtc->base.fb->height, ^ In file included from include/linux/cache.h:4:0, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:41: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:58: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ In file included from drivers/gpu/drm/i915/intel_display.c:35:0: drivers/gpu/drm/i915/intel_display.c:6796:32: error: 'struct drm_crtc' has no member named 'fb' pipe, plane, crtc->base.fb->width, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6797:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6798:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel, base, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6799:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0], ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c: In function 'intel_modeset_gem_init': drivers/gpu/drm/i915/intel_display.c:11783:9: error: 'struct drm_crtc' has no member named 'fb' if (!c->fb) ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:11786:30: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(c->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:11786:8: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:11790:33: error: 'struct drm_crtc' has no member named 'fb' drm_framebuffer_unreference(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:11791:5: error: 'struct drm_crtc' has no member named 'fb' c->fb = NULL; ^ drivers/gpu/drm/i915/intel_fbdev.c: In function 'intel_fbdev_init_bios': drivers/gpu/drm/i915/intel_fbdev.c:484:35: error: 'struct drm_crtc' has no member named 'fb' if (!intel_crtc->active || !crtc->fb) { ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_fbdev.c:27: drivers/gpu/drm/i915/intel_fbdev.c:494:34: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(crtc->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_fbdev.c:494:9: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(crtc->fb); ^ In file included from arch/x86/include/asm/bug.h:38:0, from include/linux/bug.h:4, from include/linux/thread_info.h:11, from arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_fbdev.c:27: drivers/gpu/drm/i915/intel_fbdev.c:563:13: error: 'struct drm_crtc' has no member named 'fb' WARN(!crtc->fb, ^ include/asm-generic/bug.h:95:25: note: in definition of macro 'WARN' int __ret_warn_on = !!(condition); \ ^ Caused by commit f4510a2752b7 ("drm: Replace crtc fb with primary plane fb (v3)") from the drm tree interacting with various commits in the drm-intel tree. I applied this merge fix patch: From 8b74d715803f3c8e0e76b907d8877e1355d29a31 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Thu, 3 Apr 2014 12:18:47 +1100 Subject: [PATCH] drm: fix for "Replace crtc fb with primary plane fb" Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> --- drivers/gpu/drm/i915/intel_display.c | 90 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_fbdev.c | 6 +-- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9eb4dda2d81d..dae976f51d83 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -741,7 +741,7 @@ bool intel_crtc_active(struct drm_crtc *crtc) * We can ditch the adjusted_mode.crtc_clock check as soon * as Haswell has gained clock readout/fastboot support. * - * We can ditch the crtc->fb check as soon as we can + * We can ditch the crtc->primary->fb check as soon as we can * properly reconstruct framebuffers. */ return intel_crtc->active && crtc->primary->fb && @@ -2086,17 +2086,17 @@ static bool intel_alloc_plane_obj(struct intel_crtc *crtc, if (plane_config->tiled) { obj->tiling_mode = I915_TILING_X; - obj->stride = crtc->base.fb->pitches[0]; + obj->stride = crtc->base.primary->fb->pitches[0]; } - mode_cmd.pixel_format = crtc->base.fb->pixel_format; - mode_cmd.width = crtc->base.fb->width; - mode_cmd.height = crtc->base.fb->height; - mode_cmd.pitches[0] = crtc->base.fb->pitches[0]; + mode_cmd.pixel_format = crtc->base.primary->fb->pixel_format; + mode_cmd.width = crtc->base.primary->fb->width; + mode_cmd.height = crtc->base.primary->fb->height; + mode_cmd.pitches[0] = crtc->base.primary->fb->pitches[0]; mutex_lock(&dev->struct_mutex); - if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), + if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.primary->fb), &mode_cmd, obj)) { DRM_DEBUG_KMS("intel fb init failed\n"); goto out_unref_obj; @@ -2121,14 +2121,14 @@ static void intel_find_plane_obj(struct intel_crtc *intel_crtc, struct intel_crtc *i; struct intel_framebuffer *fb; - if (!intel_crtc->base.fb) + if (!intel_crtc->base.primary->fb) return; if (intel_alloc_plane_obj(intel_crtc, plane_config)) return; - kfree(intel_crtc->base.fb); - intel_crtc->base.fb = NULL; + kfree(intel_crtc->base.primary->fb); + intel_crtc->base.primary->fb = NULL; /* * Failed to alloc the obj, check to see if we should share @@ -2140,13 +2140,13 @@ static void intel_find_plane_obj(struct intel_crtc *intel_crtc, if (c == &intel_crtc->base) continue; - if (!i->active || !c->fb) + if (!i->active || !c->primary->fb) continue; - fb = to_intel_framebuffer(c->fb); + fb = to_intel_framebuffer(c->primary->fb); if (i915_gem_obj_ggtt_offset(fb->obj) == plane_config->base) { - drm_framebuffer_reference(c->fb); - intel_crtc->base.fb = c->fb; + drm_framebuffer_reference(c->primary->fb); + intel_crtc->base.primary->fb = c->primary->fb; break; } } @@ -2396,7 +2396,7 @@ void intel_display_handle_reset(struct drm_device *dev) /* * FIXME: Once we have proper support for primary planes (and * disabling them without disabling the entire crtc) allow again - * a NULL crtc->fb. + * a NULL crtc->primary->fb. */ if (intel_crtc->active && crtc->primary->fb) dev_priv->display.update_primary_plane(crtc, @@ -5742,8 +5742,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, int fourcc, pixel_format; int aligned_height; - crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); - if (!crtc->base.fb) { + crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + if (!crtc->base.primary->fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; } @@ -5756,8 +5756,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, pixel_format = val & DISPPLANE_PIXFORMAT_MASK; fourcc = intel_format_to_fourcc(pixel_format); - crtc->base.fb->pixel_format = fourcc; - crtc->base.fb->bits_per_pixel = + crtc->base.primary->fb->pixel_format = fourcc; + crtc->base.primary->fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8; if (INTEL_INFO(dev)->gen >= 4) { @@ -5772,23 +5772,23 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, plane_config->base = base; val = I915_READ(PIPESRC(pipe)); - crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; - crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; + crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1; + crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1; val = I915_READ(DSPSTRIDE(pipe)); - crtc->base.fb->pitches[0] = val & 0xffffff80; + crtc->base.primary->fb->pitches[0] = val & 0xffffff80; - aligned_height = intel_align_height(dev, crtc->base.fb->height, + aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, plane_config->tiled); - plane_config->size = ALIGN(crtc->base.fb->pitches[0] * + plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * aligned_height, PAGE_SIZE); DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", - pipe, plane, crtc->base.fb->width, - crtc->base.fb->height, - crtc->base.fb->bits_per_pixel, base, - crtc->base.fb->pitches[0], + pipe, plane, crtc->base.primary->fb->width, + crtc->base.primary->fb->height, + crtc->base.primary->fb->bits_per_pixel, base, + crtc->base.primary->fb->pitches[0], plane_config->size); } @@ -6750,8 +6750,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, int fourcc, pixel_format; int aligned_height; - crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); - if (!crtc->base.fb) { + crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + if (!crtc->base.primary->fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; } @@ -6764,8 +6764,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, pixel_format = val & DISPPLANE_PIXFORMAT_MASK; fourcc = intel_format_to_fourcc(pixel_format); - crtc->base.fb->pixel_format = fourcc; - crtc->base.fb->bits_per_pixel = + crtc->base.primary->fb->pixel_format = fourcc; + crtc->base.primary->fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8; base = I915_READ(DSPSURF(plane)) & 0xfffff000; @@ -6780,23 +6780,23 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, plane_config->base = base; val = I915_READ(PIPESRC(pipe)); - crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; - crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; + crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1; + crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1; val = I915_READ(DSPSTRIDE(pipe)); - crtc->base.fb->pitches[0] = val & 0xffffff80; + crtc->base.primary->fb->pitches[0] = val & 0xffffff80; - aligned_height = intel_align_height(dev, crtc->base.fb->height, + aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, plane_config->tiled); - plane_config->size = ALIGN(crtc->base.fb->pitches[0] * + plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * aligned_height, PAGE_SIZE); DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", - pipe, plane, crtc->base.fb->width, - crtc->base.fb->height, - crtc->base.fb->bits_per_pixel, base, - crtc->base.fb->pitches[0], + pipe, plane, crtc->base.primary->fb->width, + crtc->base.primary->fb->height, + crtc->base.primary->fb->bits_per_pixel, base, + crtc->base.primary->fb->pitches[0], plane_config->size); } @@ -11780,15 +11780,15 @@ void intel_modeset_gem_init(struct drm_device *dev) */ mutex_lock(&dev->struct_mutex); list_for_each_entry(c, &dev->mode_config.crtc_list, head) { - if (!c->fb) + if (!c->primary->fb) continue; - fb = to_intel_framebuffer(c->fb); + fb = to_intel_framebuffer(c->primary->fb); if (intel_pin_and_fence_fb_obj(dev, fb->obj, NULL)) { DRM_ERROR("failed to pin boot fb on pipe %d\n", to_intel_crtc(c)->pipe); - drm_framebuffer_unreference(c->fb); - c->fb = NULL; + drm_framebuffer_unreference(c->primary->fb); + c->primary->fb = NULL; } } mutex_unlock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index d6d78c86c232..2b1d42dbfe13 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -481,7 +481,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { intel_crtc = to_intel_crtc(crtc); - if (!intel_crtc->active || !crtc->fb) { + if (!intel_crtc->active || !crtc->primary->fb) { DRM_DEBUG_KMS("pipe %c not active or no fb, skipping\n", pipe_name(intel_crtc->pipe)); continue; @@ -491,7 +491,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, DRM_DEBUG_KMS("found possible fb from plane %c\n", pipe_name(intel_crtc->pipe)); plane_config = &intel_crtc->plane_config; - fb = to_intel_framebuffer(crtc->fb); + fb = to_intel_framebuffer(crtc->primary->fb); max_size = plane_config->size; } } @@ -560,7 +560,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, if (!intel_crtc->active) continue; - WARN(!crtc->fb, + WARN(!crtc->primary->fb, "re-used BIOS config but lost an fb on crtc %d\n", crtc->base.id); } -- 1.9.1 -- Cheers, Stephen Rothwell sfr@canb.auug.org.au [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Rothwell <sfr@canb.auug.org.au> To: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Dave Airlie <airlied@linux.ie> Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: linux-next: build failure after merge of the drm-intel tree Date: Thu, 3 Apr 2014 12:24:35 +1100 [thread overview] Message-ID: <20140403122435.4b64cda2d046e52c9e6dae57@canb.auug.org.au> (raw) [-- Attachment #1.1: Type: text/plain, Size: 28546 bytes --] Hi all, After merging the drm-intel tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/i915/intel_display.c: In function 'intel_alloc_plane_obj': drivers/gpu/drm/i915/intel_display.c:2089:27: error: 'struct drm_crtc' has no member named 'fb' obj->stride = crtc->base.fb->pitches[0]; ^ drivers/gpu/drm/i915/intel_display.c:2092:36: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.pixel_format = crtc->base.fb->pixel_format; ^ drivers/gpu/drm/i915/intel_display.c:2093:29: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.width = crtc->base.fb->width; ^ drivers/gpu/drm/i915/intel_display.c:2094:30: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.height = crtc->base.fb->height; ^ drivers/gpu/drm/i915/intel_display.c:2095:34: error: 'struct drm_crtc' has no member named 'fb' mode_cmd.pitches[0] = crtc->base.fb->pitches[0]; ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:2099:65: error: 'struct drm_crtc' has no member named 'fb' if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:2099:34: note: in expansion of macro 'to_intel_framebuffer' if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), ^ drivers/gpu/drm/i915/intel_display.c: In function 'intel_find_plane_obj': drivers/gpu/drm/i915/intel_display.c:2124:23: error: 'struct drm_crtc' has no member named 'fb' if (!intel_crtc->base.fb) ^ drivers/gpu/drm/i915/intel_display.c:2130:24: error: 'struct drm_crtc' has no member named 'fb' kfree(intel_crtc->base.fb); ^ drivers/gpu/drm/i915/intel_display.c:2131:18: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = NULL; ^ drivers/gpu/drm/i915/intel_display.c:2143:23: error: 'struct drm_crtc' has no member named 'fb' if (!i->active || !c->fb) ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:2146:30: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(c->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:2146:8: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:2148:31: error: 'struct drm_crtc' has no member named 'fb' drm_framebuffer_reference(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:2149:20: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = c->fb; ^ drivers/gpu/drm/i915/intel_display.c:2149:27: error: 'struct drm_crtc' has no member named 'fb' intel_crtc->base.fb = c->fb; ^ drivers/gpu/drm/i915/intel_display.c: In function 'i9xx_get_plane_config': drivers/gpu/drm/i915/intel_display.c:5745:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); ^ drivers/gpu/drm/i915/intel_display.c:5746:17: error: 'struct drm_crtc' has no member named 'fb' if (!crtc->base.fb) { ^ drivers/gpu/drm/i915/intel_display.c:5759:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pixel_format = fourcc; ^ drivers/gpu/drm/i915/intel_display.c:5760:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel = ^ drivers/gpu/drm/i915/intel_display.c:5775:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:5776:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:5779:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0] = val & 0xffffff80; ^ drivers/gpu/drm/i915/intel_display.c:5781:53: error: 'struct drm_crtc' has no member named 'fb' aligned_height = intel_align_height(dev, crtc->base.fb->height, ^ In file included from include/linux/cache.h:4:0, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:41: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:5784:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:58: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:5784:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ In file included from drivers/gpu/drm/i915/intel_display.c:35:0: drivers/gpu/drm/i915/intel_display.c:5788:32: error: 'struct drm_crtc' has no member named 'fb' pipe, plane, crtc->base.fb->width, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5789:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5790:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel, base, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:5791:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0], ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c: In function 'ironlake_get_plane_config': drivers/gpu/drm/i915/intel_display.c:6753:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); ^ drivers/gpu/drm/i915/intel_display.c:6754:17: error: 'struct drm_crtc' has no member named 'fb' if (!crtc->base.fb) { ^ drivers/gpu/drm/i915/intel_display.c:6767:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pixel_format = fourcc; ^ drivers/gpu/drm/i915/intel_display.c:6768:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel = ^ drivers/gpu/drm/i915/intel_display.c:6783:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:6784:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; ^ drivers/gpu/drm/i915/intel_display.c:6787:12: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0] = val & 0xffffff80; ^ drivers/gpu/drm/i915/intel_display.c:6789:53: error: 'struct drm_crtc' has no member named 'fb' aligned_height = intel_align_height(dev, crtc->base.fb->height, ^ In file included from include/linux/cache.h:4:0, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:41: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:47: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ drivers/gpu/drm/i915/intel_display.c:6792:39: error: 'struct drm_crtc' has no member named 'fb' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ include/uapi/linux/kernel.h:10:58: note: in definition of macro '__ALIGN_KERNEL_MASK' #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ^ include/linux/kernel.h:49:22: note: in expansion of macro '__ALIGN_KERNEL' #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ^ drivers/gpu/drm/i915/intel_display.c:6792:23: note: in expansion of macro 'ALIGN' plane_config->size = ALIGN(crtc->base.fb->pitches[0] * ^ In file included from drivers/gpu/drm/i915/intel_display.c:35:0: drivers/gpu/drm/i915/intel_display.c:6796:32: error: 'struct drm_crtc' has no member named 'fb' pipe, plane, crtc->base.fb->width, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6797:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->height, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6798:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->bits_per_pixel, base, ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c:6799:19: error: 'struct drm_crtc' has no member named 'fb' crtc->base.fb->pitches[0], ^ include/drm/drmP.h:222:41: note: in definition of macro 'DRM_DEBUG_KMS' drm_ut_debug_printk(__func__, fmt, ##args); \ ^ drivers/gpu/drm/i915/intel_display.c: In function 'intel_modeset_gem_init': drivers/gpu/drm/i915/intel_display.c:11783:9: error: 'struct drm_crtc' has no member named 'fb' if (!c->fb) ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_display.c:28: drivers/gpu/drm/i915/intel_display.c:11786:30: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(c->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_display.c:11786:8: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:11790:33: error: 'struct drm_crtc' has no member named 'fb' drm_framebuffer_unreference(c->fb); ^ drivers/gpu/drm/i915/intel_display.c:11791:5: error: 'struct drm_crtc' has no member named 'fb' c->fb = NULL; ^ drivers/gpu/drm/i915/intel_fbdev.c: In function 'intel_fbdev_init_bios': drivers/gpu/drm/i915/intel_fbdev.c:484:35: error: 'struct drm_crtc' has no member named 'fb' if (!intel_crtc->active || !crtc->fb) { ^ In file included from arch/x86/include/asm/percpu.h:44:0, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_fbdev.c:27: drivers/gpu/drm/i915/intel_fbdev.c:494:34: error: 'struct drm_crtc' has no member named 'fb' fb = to_intel_framebuffer(crtc->fb); ^ include/linux/kernel.h:833:49: note: in definition of macro 'container_of' const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/gpu/drm/i915/intel_fbdev.c:494:9: note: in expansion of macro 'to_intel_framebuffer' fb = to_intel_framebuffer(crtc->fb); ^ In file included from arch/x86/include/asm/bug.h:38:0, from include/linux/bug.h:4, from include/linux/thread_info.h:11, from arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/gpu/drm/i915/intel_fbdev.c:27: drivers/gpu/drm/i915/intel_fbdev.c:563:13: error: 'struct drm_crtc' has no member named 'fb' WARN(!crtc->fb, ^ include/asm-generic/bug.h:95:25: note: in definition of macro 'WARN' int __ret_warn_on = !!(condition); \ ^ Caused by commit f4510a2752b7 ("drm: Replace crtc fb with primary plane fb (v3)") from the drm tree interacting with various commits in the drm-intel tree. I applied this merge fix patch: From 8b74d715803f3c8e0e76b907d8877e1355d29a31 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Thu, 3 Apr 2014 12:18:47 +1100 Subject: [PATCH] drm: fix for "Replace crtc fb with primary plane fb" Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> --- drivers/gpu/drm/i915/intel_display.c | 90 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_fbdev.c | 6 +-- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9eb4dda2d81d..dae976f51d83 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -741,7 +741,7 @@ bool intel_crtc_active(struct drm_crtc *crtc) * We can ditch the adjusted_mode.crtc_clock check as soon * as Haswell has gained clock readout/fastboot support. * - * We can ditch the crtc->fb check as soon as we can + * We can ditch the crtc->primary->fb check as soon as we can * properly reconstruct framebuffers. */ return intel_crtc->active && crtc->primary->fb && @@ -2086,17 +2086,17 @@ static bool intel_alloc_plane_obj(struct intel_crtc *crtc, if (plane_config->tiled) { obj->tiling_mode = I915_TILING_X; - obj->stride = crtc->base.fb->pitches[0]; + obj->stride = crtc->base.primary->fb->pitches[0]; } - mode_cmd.pixel_format = crtc->base.fb->pixel_format; - mode_cmd.width = crtc->base.fb->width; - mode_cmd.height = crtc->base.fb->height; - mode_cmd.pitches[0] = crtc->base.fb->pitches[0]; + mode_cmd.pixel_format = crtc->base.primary->fb->pixel_format; + mode_cmd.width = crtc->base.primary->fb->width; + mode_cmd.height = crtc->base.primary->fb->height; + mode_cmd.pitches[0] = crtc->base.primary->fb->pitches[0]; mutex_lock(&dev->struct_mutex); - if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.fb), + if (intel_framebuffer_init(dev, to_intel_framebuffer(crtc->base.primary->fb), &mode_cmd, obj)) { DRM_DEBUG_KMS("intel fb init failed\n"); goto out_unref_obj; @@ -2121,14 +2121,14 @@ static void intel_find_plane_obj(struct intel_crtc *intel_crtc, struct intel_crtc *i; struct intel_framebuffer *fb; - if (!intel_crtc->base.fb) + if (!intel_crtc->base.primary->fb) return; if (intel_alloc_plane_obj(intel_crtc, plane_config)) return; - kfree(intel_crtc->base.fb); - intel_crtc->base.fb = NULL; + kfree(intel_crtc->base.primary->fb); + intel_crtc->base.primary->fb = NULL; /* * Failed to alloc the obj, check to see if we should share @@ -2140,13 +2140,13 @@ static void intel_find_plane_obj(struct intel_crtc *intel_crtc, if (c == &intel_crtc->base) continue; - if (!i->active || !c->fb) + if (!i->active || !c->primary->fb) continue; - fb = to_intel_framebuffer(c->fb); + fb = to_intel_framebuffer(c->primary->fb); if (i915_gem_obj_ggtt_offset(fb->obj) == plane_config->base) { - drm_framebuffer_reference(c->fb); - intel_crtc->base.fb = c->fb; + drm_framebuffer_reference(c->primary->fb); + intel_crtc->base.primary->fb = c->primary->fb; break; } } @@ -2396,7 +2396,7 @@ void intel_display_handle_reset(struct drm_device *dev) /* * FIXME: Once we have proper support for primary planes (and * disabling them without disabling the entire crtc) allow again - * a NULL crtc->fb. + * a NULL crtc->primary->fb. */ if (intel_crtc->active && crtc->primary->fb) dev_priv->display.update_primary_plane(crtc, @@ -5742,8 +5742,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, int fourcc, pixel_format; int aligned_height; - crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); - if (!crtc->base.fb) { + crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + if (!crtc->base.primary->fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; } @@ -5756,8 +5756,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, pixel_format = val & DISPPLANE_PIXFORMAT_MASK; fourcc = intel_format_to_fourcc(pixel_format); - crtc->base.fb->pixel_format = fourcc; - crtc->base.fb->bits_per_pixel = + crtc->base.primary->fb->pixel_format = fourcc; + crtc->base.primary->fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8; if (INTEL_INFO(dev)->gen >= 4) { @@ -5772,23 +5772,23 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, plane_config->base = base; val = I915_READ(PIPESRC(pipe)); - crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; - crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; + crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1; + crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1; val = I915_READ(DSPSTRIDE(pipe)); - crtc->base.fb->pitches[0] = val & 0xffffff80; + crtc->base.primary->fb->pitches[0] = val & 0xffffff80; - aligned_height = intel_align_height(dev, crtc->base.fb->height, + aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, plane_config->tiled); - plane_config->size = ALIGN(crtc->base.fb->pitches[0] * + plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * aligned_height, PAGE_SIZE); DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", - pipe, plane, crtc->base.fb->width, - crtc->base.fb->height, - crtc->base.fb->bits_per_pixel, base, - crtc->base.fb->pitches[0], + pipe, plane, crtc->base.primary->fb->width, + crtc->base.primary->fb->height, + crtc->base.primary->fb->bits_per_pixel, base, + crtc->base.primary->fb->pitches[0], plane_config->size); } @@ -6750,8 +6750,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, int fourcc, pixel_format; int aligned_height; - crtc->base.fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); - if (!crtc->base.fb) { + crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL); + if (!crtc->base.primary->fb) { DRM_DEBUG_KMS("failed to alloc fb\n"); return; } @@ -6764,8 +6764,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, pixel_format = val & DISPPLANE_PIXFORMAT_MASK; fourcc = intel_format_to_fourcc(pixel_format); - crtc->base.fb->pixel_format = fourcc; - crtc->base.fb->bits_per_pixel = + crtc->base.primary->fb->pixel_format = fourcc; + crtc->base.primary->fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8; base = I915_READ(DSPSURF(plane)) & 0xfffff000; @@ -6780,23 +6780,23 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, plane_config->base = base; val = I915_READ(PIPESRC(pipe)); - crtc->base.fb->width = ((val >> 16) & 0xfff) + 1; - crtc->base.fb->height = ((val >> 0) & 0xfff) + 1; + crtc->base.primary->fb->width = ((val >> 16) & 0xfff) + 1; + crtc->base.primary->fb->height = ((val >> 0) & 0xfff) + 1; val = I915_READ(DSPSTRIDE(pipe)); - crtc->base.fb->pitches[0] = val & 0xffffff80; + crtc->base.primary->fb->pitches[0] = val & 0xffffff80; - aligned_height = intel_align_height(dev, crtc->base.fb->height, + aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, plane_config->tiled); - plane_config->size = ALIGN(crtc->base.fb->pitches[0] * + plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * aligned_height, PAGE_SIZE); DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", - pipe, plane, crtc->base.fb->width, - crtc->base.fb->height, - crtc->base.fb->bits_per_pixel, base, - crtc->base.fb->pitches[0], + pipe, plane, crtc->base.primary->fb->width, + crtc->base.primary->fb->height, + crtc->base.primary->fb->bits_per_pixel, base, + crtc->base.primary->fb->pitches[0], plane_config->size); } @@ -11780,15 +11780,15 @@ void intel_modeset_gem_init(struct drm_device *dev) */ mutex_lock(&dev->struct_mutex); list_for_each_entry(c, &dev->mode_config.crtc_list, head) { - if (!c->fb) + if (!c->primary->fb) continue; - fb = to_intel_framebuffer(c->fb); + fb = to_intel_framebuffer(c->primary->fb); if (intel_pin_and_fence_fb_obj(dev, fb->obj, NULL)) { DRM_ERROR("failed to pin boot fb on pipe %d\n", to_intel_crtc(c)->pipe); - drm_framebuffer_unreference(c->fb); - c->fb = NULL; + drm_framebuffer_unreference(c->primary->fb); + c->primary->fb = NULL; } } mutex_unlock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index d6d78c86c232..2b1d42dbfe13 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -481,7 +481,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { intel_crtc = to_intel_crtc(crtc); - if (!intel_crtc->active || !crtc->fb) { + if (!intel_crtc->active || !crtc->primary->fb) { DRM_DEBUG_KMS("pipe %c not active or no fb, skipping\n", pipe_name(intel_crtc->pipe)); continue; @@ -491,7 +491,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, DRM_DEBUG_KMS("found possible fb from plane %c\n", pipe_name(intel_crtc->pipe)); plane_config = &intel_crtc->plane_config; - fb = to_intel_framebuffer(crtc->fb); + fb = to_intel_framebuffer(crtc->primary->fb); max_size = plane_config->size; } } @@ -560,7 +560,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, if (!intel_crtc->active) continue; - WARN(!crtc->fb, + WARN(!crtc->primary->fb, "re-used BIOS config but lost an fb on crtc %d\n", crtc->base.id); } -- 1.9.1 -- Cheers, Stephen Rothwell sfr@canb.auug.org.au [-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2014-04-03 1:24 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-03 1:24 Stephen Rothwell [this message] 2014-04-03 1:24 ` linux-next: build failure after merge of the drm-intel tree Stephen Rothwell -- strict thread matches above, loose matches on Subject: below -- 2022-08-26 2:36 Stephen Rothwell 2022-08-26 2:36 ` Stephen Rothwell 2022-08-26 7:50 ` Jani Nikula 2022-08-26 7:50 ` Jani Nikula 2022-04-26 2:08 Stephen Rothwell 2022-04-26 2:08 ` Stephen Rothwell 2022-04-26 7:36 ` Jani Nikula 2022-04-26 7:36 ` Jani Nikula 2022-02-15 1:10 Stephen Rothwell 2022-02-15 1:10 ` Stephen Rothwell 2022-02-15 12:11 ` Jani Nikula 2022-02-15 12:11 ` Jani Nikula 2021-05-21 1:58 Stephen Rothwell 2021-05-21 1:58 ` Stephen Rothwell 2021-01-19 23:57 Stephen Rothwell 2021-01-19 23:57 ` Stephen Rothwell 2021-01-21 1:11 ` Stephen Rothwell 2021-01-21 1:11 ` Stephen Rothwell 2019-12-09 22:39 Stephen Rothwell 2019-12-09 22:42 ` Stephen Rothwell 2019-12-11 9:31 ` Jani Nikula 2019-12-11 9:31 ` Jani Nikula 2019-03-27 2:59 Stephen Rothwell 2019-03-27 2:59 ` Stephen Rothwell 2019-03-27 11:07 ` Joonas Lahtinen 2019-03-27 11:07 ` Joonas Lahtinen 2019-03-27 11:31 ` Stephen Rothwell 2019-03-27 11:31 ` Stephen Rothwell 2018-07-13 1:54 Stephen Rothwell 2018-07-23 2:29 ` Stephen Rothwell 2018-05-08 1:07 Stephen Rothwell 2018-05-08 7:08 ` Oleksandr Andrushchenko 2018-05-08 7:08 ` Oleksandr Andrushchenko 2018-05-09 5:02 ` Stephen Rothwell 2018-05-09 5:02 ` Stephen Rothwell 2018-05-09 5:08 ` Christoph Hellwig 2018-05-09 5:18 ` Stephen Rothwell 2016-10-17 23:59 Stephen Rothwell 2016-10-18 6:26 ` Daniel Vetter 2016-08-23 1:56 Stephen Rothwell 2016-08-23 1:56 ` Stephen Rothwell 2016-08-23 16:33 ` Daniel Vetter 2016-08-23 16:33 ` Daniel Vetter 2016-05-23 2:24 Stephen Rothwell 2016-05-23 2:24 ` Stephen Rothwell 2014-03-19 0:53 Stephen Rothwell 2014-03-19 0:53 ` Stephen Rothwell 2014-03-19 1:18 ` Steven Rostedt 2014-03-19 1:18 ` Steven Rostedt 2013-02-15 2:37 Stephen Rothwell 2013-02-15 2:37 ` Stephen Rothwell 2013-02-15 9:30 ` Daniel Vetter 2013-02-15 9:30 ` Daniel Vetter 2013-02-15 16:16 ` Jesse Barnes 2013-02-19 2:01 ` Stephen Rothwell 2013-02-19 10:28 ` Daniel Vetter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20140403122435.4b64cda2d046e52c9e6dae57@canb.auug.org.au \ --to=sfr@canb.auug.org.au \ --cc=airlied@linux.ie \ --cc=daniel.vetter@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-next@vger.kernel.org \ --cc=matthew.d.roper@intel.com \ --cc=robdclark@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.