Rev 5060 | Rev 6084 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5060 | Rev 5354 | ||
---|---|---|---|
Line 342... | Line 342... | ||
342 | enum pipe p; |
342 | enum pipe p; |
Line 343... | Line 343... | ||
343 | 343 | ||
Line 344... | Line 344... | ||
344 | DRM_DEBUG_KMS("\n"); |
344 | DRM_DEBUG_KMS("\n"); |
345 | 345 | ||
346 | power_domain = intel_display_port_power_domain(encoder); |
346 | power_domain = intel_display_port_power_domain(encoder); |
Line 347... | Line 347... | ||
347 | if (!intel_display_power_enabled(dev_priv, power_domain)) |
347 | if (!intel_display_power_is_enabled(dev_priv, power_domain)) |
348 | return false; |
348 | return false; |
349 | 349 | ||
Line 421... | Line 421... | ||
421 | return 5 * us; |
421 | return 5 * us; |
422 | } |
422 | } |
423 | } |
423 | } |
Line 424... | Line 424... | ||
424 | 424 | ||
425 | /* return pixels in terms of txbyteclkhs */ |
425 | /* return pixels in terms of txbyteclkhs */ |
- | 426 | static u16 txbyteclkhs(u16 pixels, int bpp, int lane_count, |
|
426 | static u16 txbyteclkhs(u16 pixels, int bpp, int lane_count) |
427 | u16 burst_mode_ratio) |
427 | { |
428 | { |
- | 429 | return DIV_ROUND_UP(DIV_ROUND_UP(pixels * bpp * burst_mode_ratio, |
|
428 | return DIV_ROUND_UP(DIV_ROUND_UP(pixels * bpp, 8), lane_count); |
430 | 8 * 100), lane_count); |
Line 429... | Line 431... | ||
429 | } |
431 | } |
430 | 432 | ||
431 | static void set_dsi_timings(struct drm_encoder *encoder, |
433 | static void set_dsi_timings(struct drm_encoder *encoder, |
Line 449... | Line 451... | ||
449 | vfp = mode->vsync_start - mode->vdisplay; |
451 | vfp = mode->vsync_start - mode->vdisplay; |
450 | vsync = mode->vsync_end - mode->vsync_start; |
452 | vsync = mode->vsync_end - mode->vsync_start; |
451 | vbp = mode->vtotal - mode->vsync_end; |
453 | vbp = mode->vtotal - mode->vsync_end; |
Line 452... | Line 454... | ||
452 | 454 | ||
453 | /* horizontal values are in terms of high speed byte clock */ |
455 | /* horizontal values are in terms of high speed byte clock */ |
- | 456 | hactive = txbyteclkhs(hactive, bpp, lane_count, |
|
454 | hactive = txbyteclkhs(hactive, bpp, lane_count); |
457 | intel_dsi->burst_mode_ratio); |
455 | hfp = txbyteclkhs(hfp, bpp, lane_count); |
458 | hfp = txbyteclkhs(hfp, bpp, lane_count, intel_dsi->burst_mode_ratio); |
- | 459 | hsync = txbyteclkhs(hsync, bpp, lane_count, |
|
456 | hsync = txbyteclkhs(hsync, bpp, lane_count); |
460 | intel_dsi->burst_mode_ratio); |
Line 457... | Line 461... | ||
457 | hbp = txbyteclkhs(hbp, bpp, lane_count); |
461 | hbp = txbyteclkhs(hbp, bpp, lane_count, intel_dsi->burst_mode_ratio); |
458 | 462 | ||
Line 459... | Line 463... | ||
459 | I915_WRITE(MIPI_HACTIVE_AREA_COUNT(pipe), hactive); |
463 | I915_WRITE(MIPI_HACTIVE_AREA_COUNT(pipe), hactive); |
Line 539... | Line 543... | ||
539 | 543 | ||
540 | if (is_vid_mode(intel_dsi) && |
544 | if (is_vid_mode(intel_dsi) && |
541 | intel_dsi->video_mode_format == VIDEO_MODE_BURST) { |
545 | intel_dsi->video_mode_format == VIDEO_MODE_BURST) { |
542 | I915_WRITE(MIPI_HS_TX_TIMEOUT(pipe), |
546 | I915_WRITE(MIPI_HS_TX_TIMEOUT(pipe), |
543 | txbyteclkhs(adjusted_mode->htotal, bpp, |
547 | txbyteclkhs(adjusted_mode->htotal, bpp, |
- | 548 | intel_dsi->lane_count, |
|
544 | intel_dsi->lane_count) + 1); |
549 | intel_dsi->burst_mode_ratio) + 1); |
545 | } else { |
550 | } else { |
546 | I915_WRITE(MIPI_HS_TX_TIMEOUT(pipe), |
551 | I915_WRITE(MIPI_HS_TX_TIMEOUT(pipe), |
547 | txbyteclkhs(adjusted_mode->vtotal * |
552 | txbyteclkhs(adjusted_mode->vtotal * |
548 | adjusted_mode->htotal, |
553 | adjusted_mode->htotal, |
- | 554 | bpp, intel_dsi->lane_count, |
|
549 | bpp, intel_dsi->lane_count) + 1); |
555 | intel_dsi->burst_mode_ratio) + 1); |
550 | } |
556 | } |
551 | I915_WRITE(MIPI_LP_RX_TIMEOUT(pipe), intel_dsi->lp_rx_timeout); |
557 | I915_WRITE(MIPI_LP_RX_TIMEOUT(pipe), intel_dsi->lp_rx_timeout); |
552 | I915_WRITE(MIPI_TURN_AROUND_TIMEOUT(pipe), intel_dsi->turn_arnd_val); |
558 | I915_WRITE(MIPI_TURN_AROUND_TIMEOUT(pipe), intel_dsi->turn_arnd_val); |