All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 20/21] drm/msm: Add SDM845 DPU support
Date: Mon, 16 Jul 2018 10:03:58 -0400	[thread overview]
Message-ID: <CAF6AEGvWkiHOntxKWJ+XXQryQp43avb4CreLAhh4auHPRL93Xw@mail.gmail.com> (raw)
In-Reply-To: <20180710154505.GT20303@art_vandelay>

On Tue, Jul 10, 2018 at 11:45 AM, Sean Paul <seanpaul@chromium.org> wrote:
> The patch was rejected for being too big. Please refer to
> https://gitlab.freedesktop.org/seanpaul/dpu-staging/commit/b4215cf040d1978287bd1403832ffc610659652b
>

heh, and also seems to be too big for gmail to reply to..

That said, +30k is a nice improvement over the +110k where this
started.  But a few comments..

+static void dpu_kms_preclose(struct msm_kms *kms, struct drm_file *file)
+{
+       struct dpu_kms *dpu_kms = to_dpu_kms(kms);
+       struct drm_device *dev = dpu_kms->dev;
+       struct msm_drm_private *priv = dev->dev_private;
+       unsigned int i;
+
+       for (i = 0; i < priv->num_crtcs; i++)
+               dpu_crtc_cancel_pending_flip(priv->crtcs[i], file);
+}

So, not totally a fan of bringing back preclose() from the dead, esp.
since it is only supposed to be used by legacy drivers.  Since all
this does is fire off pending events, I think it could be dropped
entirely... drm_events_release() should unlink unsent events from the
drm_file, and if that isn't working properly, that seems like a bug
that should be fixed in drm core.

+static int _dpu_core_irq_enable(struct dpu_kms *dpu_kms, int irq_idx)
+{
+       unsigned long irq_flags;
+       int ret = 0, enable_count;
+
+       if (!dpu_kms || !dpu_kms->hw_intr ||
+                       !dpu_kms->irq_obj.enable_counts ||
+                       !dpu_kms->irq_obj.irq_counts) {
+               DPU_ERROR("invalid params\n");
+               return -EINVAL;
+       }
+
+       if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
+               DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
+               return -EINVAL;
+       }
...
+int dpu_core_irq_enable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
+{
+       int i, ret = 0, counts;
+
+       if (!dpu_kms || !irq_idxs || !irq_count) {
+               DPU_ERROR("invalid params\n");
+               return -EINVAL;
+       }
...


there is a *whole* lot of multiple levels of null checks like this for
things that are only ever called internally (ie. not something that
can be triggered by parameters passed from userspace).. which is
really unnecessary.

(maybe something that someone who knows coccinelle better than I,
could automate cleaning up?)


+/**
+ * dpu_core_irq_disable_nolock - disable core interrupt given by the index
+ *                               without lock
+ * @dpu_kms:           Pointer to dpu kms context
+ * @irq_idx:           interrupt index
+ */
+int dpu_core_irq_disable_nolock(struct dpu_kms *dpu_kms, int irq_idx)
+{

appears to be unused?  dpu_core_irq_read_nolock() also seems unused,
and maybe some others.



diff --git a/include/uapi/media/msm_media_info.h
b/include/uapi/media/msm_media_info.h
new file mode 100644
index 000000000000..4f12e5c534c8
--- /dev/null
+++ b/include/uapi/media/msm_media_info.h
@@ -0,0 +1,1376 @@
+#ifndef __MEDIA_INFO_H__
+#define __MEDIA_INFO_H__
+
...


Not quite sure where this belongs, but (at least for now)
include/uapi/media seems very wrong.

Maybe just move into drm/msm for now?  We can always move it back to
include/uapi later (but the other direction isn't so cool)


------------------

Anyways, if I notice anything else to complain about, I'll send more
replies.  Overall it looks much better than where we started, and I'm
open to the idea of pulling it in to msm-next soon.  I think moving
msm_media_info.h out of uapi, and probably nuking preclose, should
happen first.


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

      reply	other threads:[~2018-07-16 14:04 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 17:31 [PATCH 00/21] drm/msm: Add support for SDM845 Display Processing Unit (DPU) Sean Paul
2018-07-09 17:31 ` [PATCH 01/21] dt-bindings: msm/dsi: Add mdp transfer time to msm dsi binding Sean Paul
     [not found]   ` <20180709173200.238457-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-20 14:13     ` Rob Herring
2018-07-09 17:31 ` [PATCH 05/21] drm/msm/dsi: adjust dsi timing for dual dsi mode Sean Paul
     [not found]   ` <20180709173200.238457-6-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-16 14:17     ` Archit Taneja
2018-07-09 17:31 ` [PATCH 06/21] drm/msm/dsi: Use one connector for dual DSI mode Sean Paul
2018-07-09 17:31 ` [PATCH 17/21] drm/msm: Add preclose kms hook Sean Paul
2018-07-09 17:31 ` [PATCH 19/21] dt-bindings: msm/disp: Add bindings for Snapdragon 845 DPU Sean Paul
     [not found]   ` <20180709173200.238457-20-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-12 21:08     ` [PATCH v2 " Sean Paul
     [not found]       ` <20180712210849.146638-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-16 16:21         ` Rob Herring
     [not found] ` <20180709173200.238457-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-09 17:31   ` [PATCH 02/21] dt-bindings: clock: Introduce QCOM Display clock bindings Sean Paul
2018-07-09 17:31     ` Sean Paul
2018-07-09 17:31   ` [PATCH 03/21] drm: Add support for pps and compression mode command packet Sean Paul
2018-07-09 17:31     ` Sean Paul
2018-07-09 17:31     ` Sean Paul
2018-07-09 17:31   ` [PATCH 04/21] drm: add msm compressed format modifiers Sean Paul
     [not found]     ` <20180709173200.238457-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-16 12:28       ` Rob Clark
2018-07-09 17:31   ` [PATCH 07/21] drm/msm/dsi: initialize postdiv_lock before use for 10nm pll Sean Paul
     [not found]     ` <20180709173200.238457-8-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-16 14:28       ` Archit Taneja
2018-07-09 17:31   ` [PATCH 08/21] drm/msm: Move wait_for_vblanks into mdp complete_commit() hooks Sean Paul
2018-07-09 17:31   ` [PATCH 09/21] drm/msm/mdp5: subclass msm_mdss for mdp5 Sean Paul
     [not found]     ` <20180709173200.238457-10-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-07-16 14:40       ` Archit Taneja
2018-07-09 17:31   ` [PATCH 10/21] drm/msm: enable zpos normalization Sean Paul
2018-07-09 17:31   ` [PATCH 11/21] drm/msm: higher values of pclk can exceed 32 bits when multiplied by a factor Sean Paul
2018-07-16 14:46     ` Archit Taneja
2018-07-09 17:31   ` [PATCH 12/21] drm/msm: Clean up dangling atomic_wq Sean Paul
2018-07-09 17:31   ` [PATCH 13/21] drm/msm: #define MDP version numbers Sean Paul
2018-07-09 17:31   ` [PATCH 14/21] drm/msm: Use labels for unwinding in the error path Sean Paul
2018-07-09 17:31   ` [PATCH 15/21] drm/msm: #define MAX_<OBJECT> in msm_drv.h Sean Paul
2018-07-09 17:31   ` [PATCH 16/21] drm/msm: Add .commit() callback to msm_kms functions Sean Paul
2018-07-09 17:31   ` [PATCH 18/21] drm/msm: Add pm_suspend/resume callbacks to msm_kms Sean Paul
2018-07-09 17:31   ` [PATCH 20/21] drm/msm: Add SDM845 DPU support Sean Paul
2018-07-09 17:31   ` [PATCH 21/21] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file Sean Paul
2018-07-09 17:31     ` Sean Paul
2018-07-09 18:07     ` Rob Herring
2018-07-09 18:07       ` Rob Herring
2018-07-09 18:35       ` Sean Paul
2018-07-09 18:35         ` Sean Paul
2018-07-09 19:03         ` Rob Clark
2018-07-09 19:03           ` Rob Clark
2018-07-12 21:13       ` [PATCH v2 " Sean Paul
2018-07-12 21:13         ` Sean Paul
2018-07-10 15:45 ` [PATCH 20/21] drm/msm: Add SDM845 DPU support Sean Paul
2018-07-16 14:03   ` Rob Clark [this message]

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=CAF6AEGvWkiHOntxKWJ+XXQryQp43avb4CreLAhh4auHPRL93Xw@mail.gmail.com \
    --to=robdclark@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=seanpaul@chromium.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.