All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsanka@codeaurora.org
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/msm: Add SDM845 DPU support
Date: Mon, 1 Oct 2018 12:38:56 +0300	[thread overview]
Message-ID: <20181001093856.GA13903@mwanda> (raw)

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-10-01  9:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  9:38 Dan Carpenter [this message]
2018-10-01  9:42 ` [bug report] drm/msm: Add SDM845 DPU support Dan Carpenter
2018-10-05 19:54 ` jsanka
2021-10-01 12:28 Dan Carpenter
2021-10-01 19:04 ` jesszhan
2021-10-01 13:49 Dan Carpenter
2021-10-01 13:50 ` Dan Carpenter
2021-10-01 19:03   ` jesszhan
2021-10-19 23:37   ` Jessica Zhang
2021-10-01 14:21 Dan Carpenter
2021-10-04 13:46 Dan Carpenter

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=20181001093856.GA13903@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsanka@codeaurora.org \
    /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: link
Be 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.