Skip to content

Commit 8a7827e

Browse files
committed
drm/gma500: Sanitize possible_clones
I doubt the DP+DP and SDVO+SDVO cloning works for this driver. i915 at least doesn't do those. Truthfully there could be some very specific circumstances where some of them would do doable, but genereally it's too much pain to deal with so we've chose not to bother. Let's use the same approach for gma500. Also the LVDS+LVDS and DSI+DSI cases probably don't really exist as there is one of each at most. This does mean we'll now leave possible_clones at 0 for these encoder types whereas previosuly we included the encoder itself in the bitmask. But that's fine as the core now treaks 0 as a special case and adds the encoder itself into the final bitmask reported to userspace. Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-3-ville.syrjala@linux.intel.com
1 parent 7142779 commit 8a7827e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

drivers/gpu/drm/gma500/framebuffer.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -577,31 +577,31 @@ static void psb_setup_outputs(struct drm_device *dev)
577577
break;
578578
case INTEL_OUTPUT_SDVO:
579579
crtc_mask = dev_priv->ops->sdvo_mask;
580-
clone_mask = (1 << INTEL_OUTPUT_SDVO);
580+
clone_mask = 0;
581581
break;
582582
case INTEL_OUTPUT_LVDS:
583-
crtc_mask = dev_priv->ops->lvds_mask;
584-
clone_mask = (1 << INTEL_OUTPUT_LVDS);
583+
crtc_mask = dev_priv->ops->lvds_mask;
584+
clone_mask = 0;
585585
break;
586586
case INTEL_OUTPUT_MIPI:
587587
crtc_mask = (1 << 0);
588-
clone_mask = (1 << INTEL_OUTPUT_MIPI);
588+
clone_mask = 0;
589589
break;
590590
case INTEL_OUTPUT_MIPI2:
591591
crtc_mask = (1 << 2);
592-
clone_mask = (1 << INTEL_OUTPUT_MIPI2);
592+
clone_mask = 0;
593593
break;
594594
case INTEL_OUTPUT_HDMI:
595-
crtc_mask = dev_priv->ops->hdmi_mask;
595+
crtc_mask = dev_priv->ops->hdmi_mask;
596596
clone_mask = (1 << INTEL_OUTPUT_HDMI);
597597
break;
598598
case INTEL_OUTPUT_DISPLAYPORT:
599599
crtc_mask = (1 << 0) | (1 << 1);
600-
clone_mask = (1 << INTEL_OUTPUT_DISPLAYPORT);
600+
clone_mask = 0;
601601
break;
602602
case INTEL_OUTPUT_EDP:
603603
crtc_mask = (1 << 1);
604-
clone_mask = (1 << INTEL_OUTPUT_EDP);
604+
clone_mask = 0;
605605
}
606606
encoder->possible_crtcs = crtc_mask;
607607
encoder->possible_clones =

drivers/gpu/drm/gma500/mdfld_dsi_dpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,10 +1006,10 @@ struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
10061006
/*set possible crtcs and clones*/
10071007
if (dsi_connector->pipe) {
10081008
encoder->possible_crtcs = (1 << 2);
1009-
encoder->possible_clones = (1 << 1);
1009+
encoder->possible_clones = 0;
10101010
} else {
10111011
encoder->possible_crtcs = (1 << 0);
1012-
encoder->possible_clones = (1 << 0);
1012+
encoder->possible_clones = 0;
10131013
}
10141014

10151015
dsi_connector->base.encoder = &dpi_output->base.base;

0 commit comments

Comments
 (0)