3.2.30-stable review
Subsystems (77)
PATCH 128/135 ahci: Add alternate identifier for the 88SE9172
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Cox <[email protected]>
commit 17c60c6b763cb5b83b0185e7d38d01d18e55a05a upstream.
This can also appear as 0x9192. Reported in bugzilla and confirmed with the board documentation for these boards.
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42970
--- drivers/ata/ahci.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/ata/ahci.c +2 -0
@@ -396,6 +396,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ { PCI_DEVICE(0x1b4b, 0x917a), .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ + { PCI_DEVICE(0x1b4b, 0x9192), + .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ { PCI_DEVICE(0x1b4b, 0x91a3), .driver_data = board_ahci_yes_fbs },
PATCH 129/135 drm/radeon: fix up pll selection on DCE5/6
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 26fe45a0a76f165425f332a5aaa298f149f9db22 upstream.
Selecting ATOM_PPLL_INVALID should be equivalent as the DCPLL or PPLL0 are already programmed for the DISPCLK, but the preferred method is to always specify the PLL selected. SetPixelClock will check the parameters and skip the programming if the PLL is already set up.
--- drivers/gpu/drm/radeon/atombios_crtc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/atombios_crtc.c +3 -1
@@ -1468,7 +1468,9 @@ static int radeon_atom_pick_pll(struct d* crtc virtual pixel clock. */ if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (test_encoder))) { -if (ASIC_IS_DCE5 (rdev) || rdev->clock.dp_extclk) +if (ASIC_IS_DCE5 (rdev)) +return ATOM_DCPLL ; +else if (rdev->clock.dp_extclk)return ATOM_PPLL_INVALID ; } }
PATCH 130/135 drm/radeon: fix ordering in pll picking on dce4+
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit ecd67955fd4c8e66e4df312098989d5fa7da624c upstream.
No functional change, but re-order the cases so they evaluate properly due to the way the DCE macros work.
Noticed by kallisti5 on IRC.
--- drivers/gpu/drm/radeon/atombios_crtc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +3 -3
@@ -1468,10 +1468,10 @@ static int radeon_atom_pick_pll(struct d* crtc virtual pixel clock. */ if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (test_encoder))) { -if (ASIC_IS_DCE5 (rdev)) -return ATOM_DCPLL ; -else if (rdev->clock.dp_extclk) +if (rdev->clock.dp_extclk)return ATOM_PPLL_INVALID ; +else if (ASIC_IS_DCE5 (rdev)) +return ATOM_DCPLL ; } } }
PATCH 131/135 drm/radeon: rework pll selection (v3)
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <[email protected]>
commit 985f61f7ee647ad570c05eab0b74915da2ac8e19 upstream.
For DP we can use the same PPLL for all active DP encoders. Take advantage of that to prevent cases where we may end up sharing a PPLL between DP and non-DP which won't work. Also clean up the code a bit.
v2: - fix missing pll_id assignment in crtc init
v3: - fix DP PPLL check
- document functions
- break in main encoder search loop after matching. no need to keep checking additional encoders.
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=54471
--- drivers/gpu/drm/radeon/atombios_crtc.c | 163 +++++++++++++++++++++++++------- 1 file changed, 129 insertions(+), 34 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +106 -20
@@ -1446,14 +1446,98 @@ static void radeon_legacy_atom_fixup(str } } +/** +* radeon_get_pll_use_mask - look up a mask of which pplls are in use +* +* @crtc: drm crtc +* +* Returns the mask of which PPLLs (Pixel PLLs) are in use. +*/ +static u32 radeon_get_pll_use_mask (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +struct drm_crtc *test_crtc; +struct radeon_crtc *radeon_test_crtc; +u32 pll_in_use =0 ; + +list_for_each_entry (test_crtc, &dev->mode_config.crtc_list, head) { +if (crtc == test_crtc) +continue ; + + radeon_test_crtc =to_radeon_crtc (test_crtc); +if (radeon_test_crtc->pll_id !=ATOM_PPLL_INVALID ) + pll_in_use |= (1 << radeon_test_crtc->pll_id); + } +return pll_in_use; +} + +/** +* radeon_get_shared_dp_ppll - return the PPLL used by another crtc for DP +* +* @crtc: drm crtc +* +* Returns the PPLL (Pixel PLL) used by another crtc/encoder which is +* also in DP mode. For DP, a single PPLL can be used for all DP +* crtcs/encoders. +*/ +static int radeon_get_shared_dp_ppll (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +struct drm_encoder *test_encoder; +struct radeon_crtc *radeon_test_crtc; + +list_for_each_entry (test_encoder, &dev->mode_config.encoder_list, head) { +if (test_encoder->crtc && (test_encoder->crtc != crtc)) { +if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (test_encoder))) { +/* for DP use the same PLL for all */ + radeon_test_crtc =to_radeon_crtc (test_encoder->crtc); +if (radeon_test_crtc->pll_id !=ATOM_PPLL_INVALID ) +return radeon_test_crtc->pll_id; + } + } + } +return ATOM_PPLL_INVALID ; +} + +/** +* radeon_atom_pick_pll - Allocate a PPLL for use by the crtc. +* +* @crtc: drm crtc +* +* Returns the PPLL (Pixel PLL) to be used by the crtc. For DP monitors +* a single PPLL can be used for all DP crtcs/encoders. For non-DP +* monitors a dedicated PPLL must be used. If a particular board has +* an external DP PLL, return ATOM_PPLL_INVALID to skip PLL programming +* as there is no need to program the PLL itself. If we are not able to +* allocate a PLL, return ATOM_PPLL_INVALID to skip PLL programming to +* avoid messing up an existing monitor. +* +* Asic specific PLL information +* +* DCE 6.1 +* - PPLL2 is only available to UNIPHYA (both DP and non-DP) +* - PPLL0, PPLL1 are available for UNIPHYB/C/D/E/F (both DP and non-DP) +* +* DCE 6.0 +* - PPLL0 is available to all UNIPHY (DP only) +* - PPLL1, PPLL2 are available for all UNIPHY (both DP and non-DP) and DAC +* +* DCE 5.0 +* - DCPLL is available to all UNIPHY (DP only) +* - PPLL1, PPLL2 are available for all UNIPHY (both DP and non-DP) and DAC +* +* DCE 3.0/4.0/4.1 +* - PPLL1, PPLL2 are available for all UNIPHY (both DP and non-DP) and DAC +* +*/ static int radeon_atom_pick_pll (struct drm_crtc *crtc) {struct radeon_crtc *radeon_crtc =to_radeon_crtc (crtc);struct drm_device *dev = crtc->dev;struct radeon_device *rdev = dev->dev_private;struct drm_encoder *test_encoder; -struct drm_crtc *test_crtc; -uint32_t pll_in_use =0 ; +u32 pll_in_use; +int pll;if (ASIC_IS_DCE4 (rdev)) {list_for_each_entry (test_encoder, &dev->mode_config.encoder_list, head) {
@@ -1461,7 +1545,7 @@ static int radeon_atom_pick_pll(struct d/* in DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock, * depending on the asic: * DCE4: PPLL or ext clock -* DCE5: DCPLL or ext clock +* DCE5: PPLL, DCPLL, or ext clock * * Setting ATOM_PPLL_INVALID will cause SetPixelClock to skip * PPLL/DCPLL programming and only program the DP DTO for the
@@ -1469,29 +1553,31 @@ static int radeon_atom_pick_pll(struct d*/ if (ENCODER_MODE_IS_DP (atombios_get_encoder_mode (test_encoder))) {if (rdev->clock.dp_extclk) +/* skip PPLL programming if using ext clock */ return ATOM_PPLL_INVALID ;else if (ASIC_IS_DCE5 (rdev)) +/* use DCPLL for all DP */ return ATOM_DCPLL ; +else { +/* use the same PPLL for all DP monitors */ + pll =radeon_get_shared_dp_ppll (crtc); +if (pll !=ATOM_PPLL_INVALID ) +return pll; + } } +break ; } } - -/* otherwise, pick one of the plls */ -list_for_each_entry (test_crtc, &dev->mode_config.crtc_list, head) { -struct radeon_crtc *radeon_test_crtc; - -if (crtc == test_crtc) -continue ; - - radeon_test_crtc =to_radeon_crtc (test_crtc); -if ((radeon_test_crtc->pll_id >=ATOM_PPLL1 ) && - (radeon_test_crtc->pll_id <=ATOM_PPLL2 )) - pll_in_use |= (1 << radeon_test_crtc->pll_id); - } -if (!(pll_in_use &1 )) +/* all other cases */ + pll_in_use =radeon_get_pll_use_mask (crtc); +if (!(pll_in_use & (1 <<ATOM_PPLL2 ))) +return ATOM_PPLL2 ; +if (!(pll_in_use & (1 <<ATOM_PPLL1 )))return ATOM_PPLL1 ; -return ATOM_PPLL2 ; +DRM_ERROR ("unable to allocate a PPLL\n" ); +return ATOM_PPLL_INVALID ; }else +/* use PPLL1 or PPLL2 */ return radeon_crtc->crtc_id; }
@@ -1610,7 +1696,7 @@ static void atombios_crtc_disable(structbreak ; } done: - radeon_crtc->pll_id =-1 ; + radeon_crtc->pll_id =ATOM_PPLL_INVALID ; }static const struct drm_crtc_helper_funcs atombios_helper_funcs = {
@@ -1659,6 +1745,6 @@ void radeon_atombios_init_crtc(struct drelse radeon_crtc->crtc_offset =0 ; } - radeon_crtc->pll_id =-1 ; + radeon_crtc->pll_id =ATOM_PPLL_INVALID ;drm_crtc_helper_add (&radeon_crtc->base, &atombios_helper_funcs); }
PATCH 132/135 drm/nouveau: fix booting with plymouth + dumb support
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Airlie <[email protected]>
commit 610bd7da160f76f1644ecb4cd7f39511b49a22cc upstream.
We noticed a plymouth bug on Fedora 18, and I then noticed this stupid thinko, fixing it fixed the problem with plymouth.
--- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_display.c +1 -1
@@ -598,7 +598,7 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev, args->size = args->pitch * args->height; args->size =roundup (args->size,PAGE_SIZE ); - ret =nouveau_gem_new (dev, args->size,0 ,TTM_PL_FLAG_VRAM ,0 ,0 , &bo); + ret =nouveau_gem_new (dev, args->size,0 ,NOUVEAU_GEM_DOMAIN_VRAM ,0 ,0 , &bo);if (ret)return ret;
PATCH 133/135 eCryptfs: Copy up attributes of the lower target inode after rename
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tyler Hicks <[email protected]>
commit 8335eafc2859e1a26282bef7c3d19f3d68868b8a upstream.
After calling into the lower filesystem to do a rename, the lower target inode's attributes were not copied up to the eCryptfs target inode. This resulted in the eCryptfs target inode staying around, rather than being evicted, because i_nlink was not updated for the eCryptfs inode. This also meant that eCryptfs didn't do the final iput() on the lower target inode so it stayed around, as well. This would result in a failure to free up space occupied by the target file in the rename() operation. Both target inodes would eventually be evicted when the eCryptfs filesystem was unmounted.
This patch calls fsstack_copy_attr_all() after the lower filesystem does its ->rename() so that important inode attributes, such as i_nlink, are updated at the eCryptfs layer. ecryptfs_evict_inode() is now called and eCryptfs can drop its final reference on the lower inode.
http://launchpad.net/bugs/561129
--- fs/ecryptfs/inode.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/ecryptfs/inode.c +5 -0
@@ -619,6 +619,7 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,struct dentry *lower_old_dir_dentry;struct dentry *lower_new_dir_dentry;struct dentry *trap =NULL ; +struct inode *target_inode; lower_old_dentry =ecryptfs_dentry_to_lower (old_dentry); lower_new_dentry =ecryptfs_dentry_to_lower (new_dentry);
@@ -626,6 +627,7 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,dget (lower_new_dentry); lower_old_dir_dentry =dget_parent (lower_old_dentry); lower_new_dir_dentry =dget_parent (lower_new_dentry); + target_inode = new_dentry->d_inode; trap =lock_rename (lower_old_dir_dentry, lower_new_dir_dentry);/* source should not be ancestor of target */ if (trap == lower_old_dentry) {
@@ -641,6 +643,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry, lower_new_dir_dentry->d_inode, lower_new_dentry);if (rc) goto out_lock; +if (target_inode) +fsstack_copy_attr_all (target_inode, +ecryptfs_inode_to_lower (target_inode));fsstack_copy_attr_all (new_dir, lower_new_dir_dentry->d_inode);if (new_dir != old_dir)fsstack_copy_attr_all (old_dir, lower_old_dir_dentry->d_inode);
PATCH 134/135 VFS: make vfs_fstat() use f[get|put]_light()
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit e994defb7b6813ba6fa7a2a36e86d2455ad1dc35 upstream.
Use the *_light() versions that properly avoid doing the file user count updates when they are unnecessary.
--- fs/stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/stat.c +3 -2
@@ -57,12 +57,13 @@ EXPORT_SYMBOL(vfs_getattr);int vfs_fstat (unsigned int fd,struct kstat *stat) { -struct file *f =fget (fd); +int fput_needed; +struct file *f =fget_light (fd, &fput_needed);int error = -EBADF ;if (f) { error =vfs_getattr (f->f_path.mnt, f->f_path.dentry, stat); -fput (f); +fput_light (f, fput_needed); }return error; }
PATCH 135/135 vfs: make O_PATH file descriptors usable for fstat()
In reply to Ben Hutchings3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2 upstream.
We already use them for openat() and friends, but fstat() also wants to be able to use O_PATH file descriptors. This should make it more directly comparable to the O_SEARCH of Solaris.
Note that you could already do the same thing with "fstatat()" and an empty path, but just doing "fstat()" directly is simpler and faster, so there is no reason not to just allow it directly.
See also commit 332a2e1244bd, which did the same thing for fchdir, for the same reasons.
--- fs/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/stat.c +1 -1
@@ -58,7 +58,7 @@ EXPORT_SYMBOL(vfs_getattr);int vfs_fstat (unsigned int fd,struct kstat *stat) {int fput_needed; -struct file *f =fget_light (fd, &fput_needed); +struct file *f =fget_raw_light (fd, &fput_needed);int error = -EBADF ;if (f) {