RE: [bug report] drm/msm: Add SDM845 DPU support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for reporting the issue Dan. Posted the patch below as the fix.

https://patchwork.freedesktop.org/series/50637/

Thanks and Regards,
Jeykumar S.

-----Original Message-----
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> 
Sent: Monday, October 1, 2018 2:39 AM
To: jsanka@xxxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [bug report] drm/msm: Add SDM845 DPU support

Hello Jeykumar Sankaran,

The patch 25fdd5933e4c: "drm/msm: Add SDM845 DPU support" from Jun 27, 2018,
leads to the following static checker warning:

	drivers/gpu/drm/msm/msm_drv.c:562 msm_drm_init()
	warn: 'priv->disp_thread[i].thread' isn't an ERR_PTR

drivers/gpu/drm/msm/msm_drv.c
   540          /**
   541           * this priority was found during empiric testing to have
appropriate
   542           * realtime scheduling to process display updates and
interact with
   543           * other real time and normal priority task
   544           */
   545          param.sched_priority = 16;
   546          for (i = 0; i < priv->num_crtcs; i++) {
   547  
   548                  /* initialize display thread */
   549                  priv->disp_thread[i].crtc_id =
priv->crtcs[i]->base.id;
   550                  kthread_init_worker(&priv->disp_thread[i].worker);
   551                  priv->disp_thread[i].dev = ddev;
   552                  priv->disp_thread[i].thread =
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^

   553                          kthread_run(kthread_worker_fn,
   554                                  &priv->disp_thread[i].worker,
   555                                  "crtc_commit:%d",
priv->disp_thread[i].crtc_id);
   556                  ret =
sched_setscheduler(priv->disp_thread[i].thread,
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Only pass valid pointers to this because it's going to dereference it.

   557                                                          SCHED_FIFO,
&param);
   558                  if (ret)
   559                          pr_warn("display thread priority update
failed: %d\n",
   560
ret);
   561  
   562                  if (IS_ERR(priv->disp_thread[i].thread)) {
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Too late.

   563                          dev_err(dev, "failed to create crtc_commit
kthread\n");
   564                          priv->disp_thread[i].thread = NULL;
   565                  }
   566  
   567                  /* initialize event thread */
   568                  priv->event_thread[i].crtc_id =
priv->crtcs[i]->base.id;
   569                  kthread_init_worker(&priv->event_thread[i].worker);
   570                  priv->event_thread[i].dev = ddev;
   571                  priv->event_thread[i].thread =
   572                          kthread_run(kthread_worker_fn,
   573                                  &priv->event_thread[i].worker,
   574                                  "crtc_event:%d",
priv->event_thread[i].crtc_id);

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux