Hi Manasi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next linus/master v5.9-rc8 next-20201009]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Manasi-Navare/HAX-to-make-DSC-wo...
base:
git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-m031-20201011 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/gpu/drm/i915/display/intel_display.c:3622 intel_find_initial_plane_obj() warn:
inconsistent indenting
Old smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_object.h:127 __i915_gem_object_lock() error: we
previously assumed 'ww' could be null (see line 119)
drivers/gpu/drm/i915/display/intel_display.c:6243 skl_update_scaler_plane() error: we
previously assumed 'fb' could be null (see line 6227)
drivers/gpu/drm/i915/display/intel_display.c:15208 kill_bigjoiner_slave() warn:
inconsistent indenting
drivers/gpu/drm/i915/display/intel_display.c:17197 intel_crtc_init() warn: passing a valid
pointer to 'PTR_ERR'
vim +3622 drivers/gpu/drm/i915/display/intel_display.c
3609
3610 static void
3611 intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
3612 struct intel_initial_plane_config *plane_config)
3613 {
3614 struct drm_device *dev = intel_crtc->base.dev;
3615 struct drm_i915_private *dev_priv = to_i915(dev);
3616 struct drm_crtc *c;
3617 struct drm_plane *primary = intel_crtc->base.primary;
3618 struct drm_plane_state *plane_state = primary->state;
3619 struct intel_plane *intel_plane = to_intel_plane(primary);
3620 struct intel_plane_state *intel_state =
3621 to_intel_plane_state(plane_state);
3622 struct intel_crtc_state *crtc_state =
3623
to_intel_crtc_state(intel_crtc->base.state);
3624 struct drm_framebuffer *fb;
3625 struct i915_vma *vma;
3626
3627 if (!plane_config->fb)
3628 return;
3629
3630 if (intel_alloc_initial_plane_obj(intel_crtc, plane_config)) {
3631 fb = &plane_config->fb->base;
3632 vma = plane_config->vma;
3633 goto valid_fb;
3634 }
3635
3636 /*
3637 * Failed to alloc the obj, check to see if we should share
3638 * an fb with another CRTC instead
3639 */
3640 for_each_crtc(dev, c) {
3641 struct intel_plane_state *state;
3642
3643 if (c == &intel_crtc->base)
3644 continue;
3645
3646 if (!to_intel_crtc_state(c->state)->uapi.active)
3647 continue;
3648
3649 state = to_intel_plane_state(c->primary->state);
3650 if (!state->vma)
3651 continue;
3652
3653 if (intel_plane_ggtt_offset(state) == plane_config->base) {
3654 fb = state->hw.fb;
3655 vma = state->vma;
3656 goto valid_fb;
3657 }
3658 }
3659
3660 /*
3661 * We've failed to reconstruct the BIOS FB. Current display state
3662 * indicates that the primary plane is visible, but has a NULL FB,
3663 * which will lead to problems later if we don't fix it up. The
3664 * simplest solution is to just disable the primary plane now and
3665 * pretend the BIOS never had it enabled.
3666 */
3667 intel_plane_disable_noatomic(intel_crtc, intel_plane);
3668 if (crtc_state->bigjoiner) {
3669 struct intel_crtc *slave =
3670 crtc_state->bigjoiner_linked_crtc;
3671 intel_plane_disable_noatomic(slave, to_intel_plane(slave->base.primary));
3672 }
3673
3674 return;
3675
3676 valid_fb:
3677 intel_state->hw.rotation = plane_config->rotation;
3678 intel_fill_fb_ggtt_view(&intel_state->view, fb,
3679 intel_state->hw.rotation);
3680 intel_state->color_plane[0].stride =
3681 intel_fb_pitch(fb, 0, intel_state->hw.rotation);
3682
3683 __i915_vma_pin(vma);
3684 intel_state->vma = i915_vma_get(vma);
3685 if (intel_plane_uses_fence(intel_state) && i915_vma_pin_fence(vma) == 0)
3686 if (vma->fence)
3687 intel_state->flags |= PLANE_HAS_FENCE;
3688
3689 plane_state->src_x = 0;
3690 plane_state->src_y = 0;
3691 plane_state->src_w = fb->width << 16;
3692 plane_state->src_h = fb->height << 16;
3693
3694 plane_state->crtc_x = 0;
3695 plane_state->crtc_y = 0;
3696 plane_state->crtc_w = fb->width;
3697 plane_state->crtc_h = fb->height;
3698
3699 intel_state->uapi.src = drm_plane_state_src(plane_state);
3700 intel_state->uapi.dst = drm_plane_state_dest(plane_state);
3701
3702 if (plane_config->tiling)
3703 dev_priv->preserve_bios_swizzle = true;
3704
3705 plane_state->fb = fb;
3706 drm_framebuffer_get(fb);
3707
3708 plane_state->crtc = &intel_crtc->base;
3709 intel_plane_copy_uapi_to_hw_state(intel_state, intel_state);
3710
3711 intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
3712
3713 atomic_or(to_intel_plane(primary)->frontbuffer_bit,
3714 &to_intel_frontbuffer(fb)->bits);
3715 }
3716
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org