~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/i915/intel_dp.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings, Bastian Blank, Ben Hutchings, Uwe Kleine-König
  • Date: 2012-03-04 15:32:20 UTC
  • mfrom: (43.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20120304153220-r171jd27k3dd3639
Tags: 3.2.9-1
* New upstream stable update:
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.8
  - [i386] i387: move TS_USEDFPU flag from thread_info to task_struct
  - [x86] additional refactoring of FPU/SSE state save and restore
  http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.9
  - vfs: fix d_inode_lookup() dentry ref leak
  - target: Allow control CDBs with data > 1 page
  - epoll: introduce POLLFREE to flush ->signalfd_wqh before kfree()
  - epoll: ep_unregister_pollwait() can use the freed pwq->whead
  - epoll: limit paths (CVE-2011-1083)
  - cdrom: use copy_to_user() without the underscores

[ Bastian Blank ]
* [mips,mipsel] Also remove ext4 modules from installer.

[ Ben Hutchings ]
* Update debconf template translations:
  - Update Dutch (Willem Kuyn) (Closes: #658736)
  - Add Polish (Michał Kułach) (Closes: #658912)
* Bump ABI to 2
* fs: Introduce and enable security restrictions on links:
  - Do not follow symlinks in /tmp that are owned by other users
    (sysctl: fs.protected_symlinks)
  - Do not allow unprivileged users to create hard links to sensitive files
    (sysctl: fs.protected_hardlinks) (Closes: #609455)
    + This breaks the 'at' package in stable, which will be fixed shortly
      (see #597130)
  The precise restrictions are specified in Documentation/sysctl/fs.txt in
  the linux-doc-3.2 and linux-source-3.2 packages.
* iwlwifi: fix key removal (Closes: #651199)
* cgroups: Set CGROUP_PERF
* hid: Enable HID_HOLTEK, HID_PRIMAX, HID_SPEEDLINK, HID_WIIMOTE as modules,
  HID_ACRUX_FF
* media/rc: Enable RC_ATI_REMOTE as module
* gspca: Enable USB_GSPCA_TOPRO as module
* dvb-usb: Enable DVB_USB_PCTV452E, DVB_USB_MXL111SF as modules

[ Uwe Kleine-König ]
* [x86] Update rt featureset to 3.2.9-rt15

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
 */
209
209
 
210
210
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)
212
212
{
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
 
 
222
213
        return (pixel_clock * bpp + 9) / 10;
223
214
}
224
215
 
245
236
                        return MODE_PANEL;
246
237
        }
247
238
 
248
 
        mode_rate = intel_dp_link_required(intel_dp, mode->clock, 0);
 
239
        mode_rate = intel_dp_link_required(mode->clock, 24);
249
240
        max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
250
241
 
251
242
        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);
254
244
                        if (mode_rate > max_rate)
255
245
                                return MODE_CLOCK_HIGH;
256
246
                        else
683
673
        int lane_count, clock;
684
674
        int max_lane_count = intel_dp_max_lane_count(intel_dp);
685
675
        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;
687
677
        static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 };
688
678
 
689
679
        if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) {
701
691
                for (clock = 0; clock <= max_clock; clock++) {
702
692
                        int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count);
703
693
 
704
 
                        if (intel_dp_link_required(intel_dp, mode->clock, bpp)
 
694
                        if (intel_dp_link_required(mode->clock, bpp)
705
695
                                        <= link_avail) {
706
696
                                intel_dp->link_bw = bws[clock];
707
697
                                intel_dp->lane_count = lane_count;