]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/msm/dpu: Stop copying around mode->private_flags
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 28 Apr 2020 17:19:28 +0000 (20:19 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 27 May 2020 11:31:42 +0000 (14:31 +0300)
The driver never sets mode->private_flags so copying
it back and forth is entirely pointless. Stop doing it.

Also drop private_flags from the tracepoint.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h

index a1b79ee2bd9d574f6a17ff617f95360b07ff1806..d22ecabebb08343fcb4a2e507a7b7f82b576f454 100644 (file)
@@ -498,23 +498,6 @@ void dpu_encoder_helper_split_config(
        }
 }
 
-static void _dpu_encoder_adjust_mode(struct drm_connector *connector,
-               struct drm_display_mode *adj_mode)
-{
-       struct drm_display_mode *cur_mode;
-
-       if (!connector || !adj_mode)
-               return;
-
-       list_for_each_entry(cur_mode, &connector->modes, head) {
-               if (cur_mode->vdisplay == adj_mode->vdisplay &&
-                   cur_mode->hdisplay == adj_mode->hdisplay &&
-                   drm_mode_vrefresh(cur_mode) == drm_mode_vrefresh(adj_mode)) {
-                       adj_mode->private_flags |= cur_mode->private_flags;
-               }
-       }
-}
-
 static struct msm_display_topology dpu_encoder_get_topology(
                        struct dpu_encoder_virt *dpu_enc,
                        struct dpu_kms *dpu_kms,
@@ -580,15 +563,6 @@ static int dpu_encoder_virt_atomic_check(
        global_state = dpu_kms_get_existing_global_state(dpu_kms);
        trace_dpu_enc_atomic_check(DRMID(drm_enc));
 
-       /*
-        * display drivers may populate private fields of the drm display mode
-        * structure while registering possible modes of a connector with DRM.
-        * These private fields are not populated back while DRM invokes
-        * the mode_set callbacks. This module retrieves and populates the
-        * private fields of the given mode.
-        */
-       _dpu_encoder_adjust_mode(conn_state->connector, adj_mode);
-
        /* perform atomic check on the first physical encoder (master) */
        for (i = 0; i < dpu_enc->num_phys_encs; i++) {
                struct dpu_encoder_phys *phys = dpu_enc->phys_encs[i];
@@ -621,8 +595,7 @@ static int dpu_encoder_virt_atomic_check(
                }
        }
 
-       trace_dpu_enc_atomic_check_flags(DRMID(drm_enc), adj_mode->flags,
-                       adj_mode->private_flags);
+       trace_dpu_enc_atomic_check_flags(DRMID(drm_enc), adj_mode->flags);
 
        return ret;
 }
index eecfe9b3199eaed244826a8f35b021d21389395b..6714b088970f9c208b55cd8a4332789b4e19028b 100644 (file)
@@ -327,20 +327,18 @@ DEFINE_EVENT(dpu_enc_keyval_template, dpu_enc_trigger_start,
 );
 
 TRACE_EVENT(dpu_enc_atomic_check_flags,
-       TP_PROTO(uint32_t drm_id, unsigned int flags, int private_flags),
-       TP_ARGS(drm_id, flags, private_flags),
+       TP_PROTO(uint32_t drm_id, unsigned int flags),
+       TP_ARGS(drm_id, flags),
        TP_STRUCT__entry(
                __field(        uint32_t,               drm_id          )
                __field(        unsigned int,           flags           )
-               __field(        int,                    private_flags   )
        ),
        TP_fast_assign(
                __entry->drm_id = drm_id;
                __entry->flags = flags;
-               __entry->private_flags = private_flags;
        ),
-       TP_printk("id=%u, flags=%u, private_flags=%d",
-                 __entry->drm_id, __entry->flags, __entry->private_flags)
+       TP_printk("id=%u, flags=%u",
+                 __entry->drm_id, __entry->flags)
 );
 
 DECLARE_EVENT_CLASS(dpu_enc_id_enable_template,