Skip to content

Commit 612b850

Browse files
committed
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2) drm/i915: no lvds quirk for AOpen MP45 drm/i915: Force explicit bpp selection for intel_dp_link_required drm/radeon: do not continue after error from r600_ib_test drivers/gpu/drm/drm_ioc32.c: initialize all fields drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT drm/i915:: Disable FBC on SandyBridge
2 parents af5feae + 28a4d56 commit 612b850

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

drivers/gpu/drm/drm_ioc32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd,
315315
if (err)
316316
return err;
317317

318-
if (__get_user(c32.auth, &client->auth)
318+
if (__get_user(c32.idx, &client->idx)
319+
|| __get_user(c32.auth, &client->auth)
319320
|| __get_user(c32.pid, &client->pid)
320321
|| __get_user(c32.uid, &client->uid)
321322
|| __get_user(c32.magic, &client->magic)

drivers/gpu/drm/i915/intel_display.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ static void intel_update_fbc(struct drm_device *dev)
18721872
if (enable_fbc < 0) {
18731873
DRM_DEBUG_KMS("fbc set to per-chip default\n");
18741874
enable_fbc = 1;
1875-
if (INTEL_INFO(dev)->gen <= 5)
1875+
if (INTEL_INFO(dev)->gen <= 6)
18761876
enable_fbc = 0;
18771877
}
18781878
if (!enable_fbc) {
@@ -5307,6 +5307,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
53075307
}
53085308
}
53095309

5310+
pipeconf &= ~PIPECONF_INTERLACE_MASK;
53105311
if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
53115312
pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION;
53125313
/* the chip adds 2 halflines automatically */
@@ -5317,7 +5318,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
53175318
adjusted_mode->crtc_vsync_end -= 1;
53185319
adjusted_mode->crtc_vsync_start -= 1;
53195320
} else
5320-
pipeconf &= ~PIPECONF_INTERLACE_MASK; /* progressive */
5321+
pipeconf |= PIPECONF_PROGRESSIVE;
53215322

53225323
I915_WRITE(HTOTAL(pipe),
53235324
(adjusted_mode->crtc_hdisplay - 1) |
@@ -5902,6 +5903,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
59025903
}
59035904
}
59045905

5906+
pipeconf &= ~PIPECONF_INTERLACE_MASK;
59055907
if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
59065908
pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION;
59075909
/* the chip adds 2 halflines automatically */
@@ -5912,7 +5914,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
59125914
adjusted_mode->crtc_vsync_end -= 1;
59135915
adjusted_mode->crtc_vsync_start -= 1;
59145916
} else
5915-
pipeconf &= ~PIPECONF_INTERLACE_W_FIELD_INDICATION; /* progressive */
5917+
pipeconf |= PIPECONF_PROGRESSIVE;
59165918

59175919
I915_WRITE(HTOTAL(pipe),
59185920
(adjusted_mode->crtc_hdisplay - 1) |

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,8 @@ intel_dp_link_clock(uint8_t link_bw)
208208
*/
209209

210210
static int
211-
intel_dp_link_required(struct intel_dp *intel_dp, int pixel_clock, int check_bpp)
211+
intel_dp_link_required(int pixel_clock, int bpp)
212212
{
213-
struct drm_crtc *crtc = intel_dp->base.base.crtc;
214-
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
215-
int bpp = 24;
216-
217-
if (check_bpp)
218-
bpp = check_bpp;
219-
else if (intel_crtc)
220-
bpp = intel_crtc->bpp;
221-
222213
return (pixel_clock * bpp + 9) / 10;
223214
}
224215

@@ -245,12 +236,11 @@ intel_dp_mode_valid(struct drm_connector *connector,
245236
return MODE_PANEL;
246237
}
247238

248-
mode_rate = intel_dp_link_required(intel_dp, mode->clock, 0);
239+
mode_rate = intel_dp_link_required(mode->clock, 24);
249240
max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
250241

251242
if (mode_rate > max_rate) {
252-
mode_rate = intel_dp_link_required(intel_dp,
253-
mode->clock, 18);
243+
mode_rate = intel_dp_link_required(mode->clock, 18);
254244
if (mode_rate > max_rate)
255245
return MODE_CLOCK_HIGH;
256246
else
@@ -683,7 +673,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
683673
int lane_count, clock;
684674
int max_lane_count = intel_dp_max_lane_count(intel_dp);
685675
int max_clock = intel_dp_max_link_bw(intel_dp) == DP_LINK_BW_2_7 ? 1 : 0;
686-
int bpp = mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 0;
676+
int bpp = mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24;
687677
static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 };
688678

689679
if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) {
@@ -701,7 +691,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
701691
for (clock = 0; clock <= max_clock; clock++) {
702692
int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
703693

704-
if (intel_dp_link_required(intel_dp, mode->clock, bpp)
694+
if (intel_dp_link_required(mode->clock, bpp)
705695
<= link_avail) {
706696
intel_dp->link_bw = bws[clock];
707697
intel_dp->lane_count = lane_count;

drivers/gpu/drm/i915/intel_lvds.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
692692
DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
693693
},
694694
},
695+
{
696+
.callback = intel_no_lvds_dmi_callback,
697+
.ident = "AOpen i45GMx-I",
698+
.matches = {
699+
DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
700+
DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"),
701+
},
702+
},
695703
{
696704
.callback = intel_no_lvds_dmi_callback,
697705
.ident = "Aopen i945GTt-VFA",

drivers/gpu/drm/radeon/evergreen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3191,6 +3191,7 @@ static int evergreen_startup(struct radeon_device *rdev)
31913191
if (r) {
31923192
DRM_ERROR("radeon: failed testing IB (%d).\n", r);
31933193
rdev->accel_working = false;
3194+
return r;
31943195
}
31953196

31963197
r = r600_audio_init(rdev);

0 commit comments

Comments
 (0)