Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync with upstream. #1

Merged
merged 61 commits into from
Aug 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3b2c171
drm/i915: Wait up to 3ms for the pcu to ack the cdclk change request …
vsyrjala Jul 13, 2016
a7b4667
drm/i915: Never fully mask the the EI up rps interrupt on SNB/IVB
vsyrjala May 23, 2016
0596a90
Btrfs: add missing check for writeback errors on fsync
fdmanana Jun 14, 2016
801bec3
Btrfs: send, fix failure to move directories with the same name around
Jun 23, 2015
7969e77
Btrfs: send, add missing error check for calls to path_loop()
fdmanana Jun 17, 2016
4122ea6
Btrfs: incremental send, fix invalid paths for rename operations
fdmanana Jun 27, 2016
99ea42d
Btrfs: incremental send, fix premature rmdir operations
Jun 23, 2015
443f9d2
Btrfs: send, fix warning due to late freeing of orphan_dir_info struc…
Jun 22, 2015
764433a
Btrfs: send, fix invalid leaf accesses due to incorrect utimes operat…
Jun 23, 2015
15b253e
Btrfs: send, avoid incorrect leaf accesses when sending utimes operat…
fdmanana Jul 2, 2016
9515558
Btrfs: send, don't bug on inconsistent snapshots
fdmanana Aug 1, 2016
6771089
Btrfs: be more precise on errors when getting an inode from disk
fdmanana Jun 6, 2016
44f714d
Btrfs: improve performance on fsync against new inode after rename/un…
fdmanana Jun 6, 2016
7f555c8
drm/amdgpu/gmc7: add missing mullins case
alexdeucher Jul 29, 2016
903f75c
drm/amdgpu/ci: add mullins to default case for smc ucode
alexdeucher Jul 29, 2016
4f7ec15
drm/amd/amdgpu: change pptable output format from ASCII to binary
erichuang22 Jul 28, 2016
fe85f07
drm/amdgpu: update golden setting of iceland
huangrui Aug 2, 2016
3a494b5
drm/amdgpu: update golden setting of carrizo
huangrui Aug 2, 2016
9761bc5
drm/amdgpu: update golden setting of polaris11
huangrui Aug 2, 2016
6d51c81
drm/amdgpu: update golden setting of stoney
huangrui Aug 2, 2016
a5a5e30
drm/amdgpu: update golden setting of polaris10
huangrui Aug 2, 2016
e657149
Btrfs: remove unused function btrfs_add_delayed_qgroup_reserve()
fdmanana Aug 3, 2016
c45eb4f
drm/i915/fbdev: Check for the framebuffer before use
ickle Jul 13, 2016
34b5835
drm/ttm: Wait for a BO to become idle before unbinding it from GTT
Aug 5, 2016
1083881
Merge branch 'integration-4.8' of git://git.kernel.org/pub/scm/linux/…
masoncl Aug 5, 2016
29986cc
drm: rcar-du: Link HDMI encoder with bridge
Aug 3, 2016
5c6c201
drm: Paper over locking inversion after registration rework
danvet Aug 4, 2016
e8285ce
Merge tag 'drm-intel-next-fixes-2016-08-05' of git://anongit.freedesk…
airlied Aug 8, 2016
4872850
Merge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/li…
airlied Aug 8, 2016
65a97a6
dell-wmi: Ignore WMI event 0xe00e
pali Jul 27, 2016
e10aec6
drm/edid: Add 6 bpc quirk for display AEO model 0.
kleinerm Jul 6, 2016
196f954
drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capab…
kleinerm Jul 6, 2016
210a021
drm/edid: Set 8 bpc color depth for displays with "DFP 1.x compliant …
kleinerm Jul 6, 2016
d26e941
kbuild: no gcc-plugins during cc-option tests
ephox-gcc-plugins Jun 18, 2016
ed58c0e
gcc-plugins: abort builds cleanly when not supported
kees Jun 18, 2016
65d59ec
gcc-plugins: Add support for passing plugin arguments
ephox-gcc-plugins Jun 20, 2016
7040c83
gcc-plugins: Automate make rule generation
ephox-gcc-plugins Jun 26, 2016
caefd8c
gcc-plugins: Add support for plugin subdirectories
ephox-gcc-plugins Jun 26, 2016
36e9d08
drm/cirrus: Fix NULL pointer dereference when registering the fbdev
Aug 9, 2016
97b1d23
metag: Drop show_mem() from mem_init()
Aug 5, 2016
c87edb3
tracing: Fix tick_stop tracepoint symbols for user export
rostedt Aug 5, 2016
c4159a7
mm: memcontrol: only mark charged pages with PageKmemcg
Aug 8, 2016
a3d1ddd
ipr: Fix sync scsi scan
bjking1 Aug 8, 2016
cb0d93a
Merge tag 'drm-fixes-for-4.8-rc2' of git://people.freedesktop.org/~ai…
torvalds Aug 9, 2016
e1d009e
Merge tag 'platform-drivers-x86-v4.8-3' of git://git.infradead.org/us…
torvalds Aug 9, 2016
b79f34d
Merge tag 'gcc-plugin-infrastructure-v4.8-rc2' of git://git.kernel.or…
torvalds Aug 9, 2016
84bd8d3
Merge tag 'trace-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Aug 9, 2016
a0cba21
Revert "printk: create pr_<level> functions"
torvalds Aug 9, 2016
aec742e
get_maintainer: Don't check if STDIN exists in a VCS repository
JoePerches Aug 10, 2016
315581a
Merge tag 'metag-for-v4.8-rc2' of git://git.kernel.org/pub/scm/linux/…
torvalds Aug 10, 2016
9512c47
Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Aug 10, 2016
7de2499
arm: oabi compat: add missing access checks
Jul 28, 2016
7398413
rapidio: dereferencing an error pointer
Aug 10, 2016
a545de5
revert "ARM: keystone: dts: add psci command definition"
akpm00 Aug 10, 2016
3b33719
thp: move shmem_huge_enabled() outside of SYSFS ifdef
arndb Aug 10, 2016
81cbcbc
mm/page_alloc.c: fix wrong initialization when sysctl_min_unmapped_ra…
JoonsooKim Aug 10, 2016
6423aa8
mm/page_alloc.c: recalculate some of node threshold when on/offline m…
JoonsooKim Aug 10, 2016
c8efc39
mm, rmap: fix false positive VM_BUG() in page_add_file_rmap()
kiryl Aug 10, 2016
57dea93
rmap: fix compound check logic in page_remove_file_rmap
stevecapperarm Aug 10, 2016
6039892
mm/slub.c: run free_partial() outside of the kmem_cache_node->list_lock
ickle Aug 10, 2016
85e97be
Merge branch 'akpm' (patches from Andrew)
torvalds Aug 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,6 @@ endif
# Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)

PHONY += gcc-plugins
gcc-plugins: scripts_basic
ifdef CONFIG_GCC_PLUGINS
$(Q)$(MAKE) $(build)=scripts/gcc-plugins
endif
@:

include scripts/Makefile.gcc-plugins

ifdef CONFIG_READABLE_ASM
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/boot/dts/keystone.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@
cpu_on = <0x84000003>;
};

psci {
compatible = "arm,psci";
method = "smc";
cpu_suspend = <0x84000001>;
cpu_off = <0x84000002>;
cpu_on = <0x84000003>;
};

soc {
#address-cells = <1>;
#size-cells = <1>;
Expand Down
8 changes: 7 additions & 1 deletion arch/arm/kernel/sys_oabi-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
mm_segment_t fs;
long ret, err, i;

if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event)))
if (maxevents <= 0 ||
maxevents > (INT_MAX/sizeof(*kbuf)) ||
maxevents > (INT_MAX/sizeof(*events)))
return -EINVAL;
if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents))
return -EFAULT;
kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
if (!kbuf)
return -ENOMEM;
Expand Down Expand Up @@ -317,6 +321,8 @@ asmlinkage long sys_oabi_semtimedop(int semid,

if (nsops < 1 || nsops > SEMOPM)
return -EINVAL;
if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops))
return -EFAULT;
sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
if (!sops)
return -ENOMEM;
Expand Down
1 change: 0 additions & 1 deletion arch/metag/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ void __init mem_init(void)

free_all_bootmem();
mem_init_print_info(NULL);
show_mem(0);
}

void free_initmem(void)
Expand Down
7 changes: 2 additions & 5 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
struct drm_device *ddev = dev_get_drvdata(dev);
struct amdgpu_device *adev = ddev->dev_private;
char *table = NULL;
int size, i;
int size;

if (adev->pp_enabled)
size = amdgpu_dpm_get_pp_table(adev, &table);
Expand All @@ -315,10 +315,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
if (size >= PAGE_SIZE)
size = PAGE_SIZE - 1;

for (i = 0; i < size; i++) {
sprintf(buf + i, "%02x", table[i]);
}
sprintf(buf + i, "\n");
memcpy(buf, table, size);

return size;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
if (unlikely(r)) {
goto out_cleanup;
}
r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
out_cleanup:
ttm_bo_mem_put(bo, &tmp_mem);
return r;
Expand Down Expand Up @@ -368,7 +368,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
if (unlikely(r)) {
return r;
}
r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
if (unlikely(r)) {
goto out_cleanup;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/ci_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5779,6 +5779,7 @@ static int ci_dpm_init_microcode(struct amdgpu_device *adev)
break;
case CHIP_KAVERI:
case CHIP_KABINI:
case CHIP_MULLINS:
default: BUG();
}

Expand Down
12 changes: 8 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ static const u32 tonga_mgcg_cgcg_init[] =

static const u32 golden_settings_polaris11_a11[] =
{
mmCB_HW_CONTROL, 0xfffdf3cf, 0x00006208,
mmCB_HW_CONTROL, 0x0000f3cf, 0x00007208,
mmCB_HW_CONTROL_2, 0x0f000000, 0x0f000000,
mmCB_HW_CONTROL_3, 0x000001ff, 0x00000040,
mmDB_DEBUG2, 0xf00fffff, 0x00000400,
mmPA_SC_ENHANCE, 0xffffffff, 0x20000001,
Expand All @@ -279,7 +280,7 @@ static const u32 golden_settings_polaris11_a11[] =
mmPA_SC_RASTER_CONFIG_1, 0x0000003f, 0x00000000,
mmRLC_CGCG_CGLS_CTRL, 0x00000003, 0x0001003c,
mmRLC_CGCG_CGLS_CTRL_3D, 0xffffffff, 0x0001003c,
mmSQ_CONFIG, 0x07f80000, 0x07180000,
mmSQ_CONFIG, 0x07f80000, 0x01180000,
mmTA_CNTL_AUX, 0x000f000f, 0x000b0000,
mmTCC_CTRL, 0x00100000, 0xf31fff7f,
mmTCP_ADDR_CONFIG, 0x000003ff, 0x000000f3,
Expand All @@ -301,8 +302,8 @@ static const u32 polaris11_golden_common_all[] =
static const u32 golden_settings_polaris10_a11[] =
{
mmATC_MISC_CG, 0x000c0fc0, 0x000c0200,
mmCB_HW_CONTROL, 0xfffdf3cf, 0x00007208,
mmCB_HW_CONTROL_2, 0, 0x0f000000,
mmCB_HW_CONTROL, 0x0001f3cf, 0x00007208,
mmCB_HW_CONTROL_2, 0x0f000000, 0x0f000000,
mmCB_HW_CONTROL_3, 0x000001ff, 0x00000040,
mmDB_DEBUG2, 0xf00fffff, 0x00000400,
mmPA_SC_ENHANCE, 0xffffffff, 0x20000001,
Expand Down Expand Up @@ -409,6 +410,7 @@ static const u32 golden_settings_iceland_a11[] =
mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000,
mmPA_SC_RASTER_CONFIG, 0x3f3fffff, 0x00000002,
mmPA_SC_RASTER_CONFIG_1, 0x0000003f, 0x00000000,
mmRLC_CGCG_CGLS_CTRL, 0x00000003, 0x0000003c,
mmSQ_RANDOM_WAVE_PRI, 0x001fffff, 0x000006fd,
mmTA_CNTL_AUX, 0x000f000f, 0x000b0000,
mmTCC_CTRL, 0x00100000, 0xf31fff7f,
Expand Down Expand Up @@ -505,8 +507,10 @@ static const u32 cz_golden_settings_a11[] =
mmGB_GPU_ID, 0x0000000f, 0x00000000,
mmPA_SC_ENHANCE, 0xffffffff, 0x00000001,
mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000,
mmRLC_CGCG_CGLS_CTRL, 0x00000003, 0x0000003c,
mmSQ_RANDOM_WAVE_PRI, 0x001fffff, 0x000006fd,
mmTA_CNTL_AUX, 0x000f000f, 0x00010000,
mmTCC_CTRL, 0x00100000, 0xf31fff7f,
mmTCC_EXE_DISABLE, 0x00000002, 0x00000002,
mmTCP_ADDR_CONFIG, 0x0000000f, 0x000000f3,
mmTCP_CHAN_STEER_LO, 0xffffffff, 0x00001302
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static int gmc_v7_0_init_microcode(struct amdgpu_device *adev)
break;
case CHIP_KAVERI:
case CHIP_KABINI:
case CHIP_MULLINS:
return 0;
default: BUG();
}
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ static const u32 stoney_mgcg_cgcg_init[] =
mmMC_MEM_POWER_LS, 0xffffffff, 0x00000104
};

static const u32 golden_settings_stoney_common[] =
{
mmMC_HUB_RDREQ_UVD, MC_HUB_RDREQ_UVD__PRESCALE_MASK, 0x00000004,
mmMC_RD_GRP_OTH, MC_RD_GRP_OTH__UVD_MASK, 0x00600000
};

static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev)
{
Expand Down Expand Up @@ -142,6 +147,9 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev)
amdgpu_program_register_sequence(adev,
stoney_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(stoney_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev,
golden_settings_stoney_common,
(const u32)ARRAY_SIZE(golden_settings_stoney_common));
break;
default:
break;
Expand Down
13 changes: 11 additions & 2 deletions drivers/gpu/drm/cirrus/cirrus_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,23 @@ int cirrus_driver_load(struct drm_device *dev, unsigned long flags)
goto out;
}

/*
* cirrus_modeset_init() is initializing/registering the emulated fbdev
* and DRM internals can access/test some of the fields in
* mode_config->funcs as part of the fbdev registration process.
* Make sure dev->mode_config.funcs is properly set to avoid
* dereferencing a NULL pointer.
* FIXME: mode_config.funcs assignment should probably be done in
* cirrus_modeset_init() (that's a common pattern seen in other DRM
* drivers).
*/
dev->mode_config.funcs = &cirrus_mode_funcs;
r = cirrus_modeset_init(cdev);
if (r) {
dev_err(&dev->pdev->dev, "Fatal error during modeset init: %d\n", r);
goto out;
}

dev->mode_config.funcs = (void *)&cirrus_mode_funcs;

return 0;
out:
cirrus_driver_unload(dev);
Expand Down
8 changes: 3 additions & 5 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,16 +1121,14 @@ static int drm_connector_register_all(struct drm_device *dev)
struct drm_connector *connector;
int ret;

mutex_lock(&dev->mode_config.mutex);

drm_for_each_connector(connector, dev) {
/* FIXME: taking the mode config mutex ends up in a clash with
* fbcon/backlight registration */
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
ret = drm_connector_register(connector);
if (ret)
goto err;
}

mutex_unlock(&dev->mode_config.mutex);

return 0;

err:
Expand Down
22 changes: 22 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
#define EDID_QUIRK_FORCE_8BPC (1 << 8)
/* Force 12bpc */
#define EDID_QUIRK_FORCE_12BPC (1 << 9)
/* Force 6bpc */
#define EDID_QUIRK_FORCE_6BPC (1 << 10)

struct detailed_mode_closure {
struct drm_connector *connector;
Expand All @@ -100,6 +102,9 @@ static struct edid_quirk {
/* Unknown Acer */
{ "ACR", 2423, EDID_QUIRK_FIRST_DETAILED_PREFERRED },

/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */
{ "AEO", 0, EDID_QUIRK_FORCE_6BPC },

/* Belinea 10 15 55 */
{ "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 },
{ "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
Expand Down Expand Up @@ -3862,6 +3867,20 @@ static void drm_add_display_info(struct edid *edid,
/* HDMI deep color modes supported? Assign to info, if so */
drm_assign_hdmi_deep_color_info(edid, info, connector);

/*
* Digital sink with "DFP 1.x compliant TMDS" according to EDID 1.3?
*
* For such displays, the DFP spec 1.0, section 3.10 "EDID support"
* tells us to assume 8 bpc color depth if the EDID doesn't have
* extensions which tell otherwise.
*/
if ((info->bpc == 0) && (edid->revision < 4) &&
(edid->input & DRM_EDID_DIGITAL_TYPE_DVI)) {
info->bpc = 8;
DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
connector->name, info->bpc);
}

/* Only defined for 1.4 with digital displays */
if (edid->revision < 4)
return;
Expand Down Expand Up @@ -4082,6 +4101,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)

drm_add_display_info(edid, &connector->display_info, connector);

if (quirks & EDID_QUIRK_FORCE_6BPC)
connector->display_info.bpc = 6;

if (quirks & EDID_QUIRK_FORCE_8BPC)
connector->display_info.bpc = 8;

Expand Down
30 changes: 6 additions & 24 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5691,15 +5691,7 @@ static bool skl_cdclk_pcu_ready(struct drm_i915_private *dev_priv)

static bool skl_cdclk_wait_for_pcu_ready(struct drm_i915_private *dev_priv)
{
unsigned int i;

for (i = 0; i < 15; i++) {
if (skl_cdclk_pcu_ready(dev_priv))
return true;
udelay(10);
}

return false;
return _wait_for(skl_cdclk_pcu_ready(dev_priv), 3000, 10) == 0;
}

static void skl_set_cdclk(struct drm_i915_private *dev_priv, int cdclk, int vco)
Expand Down Expand Up @@ -12114,21 +12106,11 @@ connected_sink_compute_bpp(struct intel_connector *connector,
pipe_config->pipe_bpp = connector->base.display_info.bpc*3;
}

/* Clamp bpp to default limit on screens without EDID 1.4 */
if (connector->base.display_info.bpc == 0) {
int type = connector->base.connector_type;
int clamp_bpp = 24;

/* Fall back to 18 bpp when DP sink capability is unknown. */
if (type == DRM_MODE_CONNECTOR_DisplayPort ||
type == DRM_MODE_CONNECTOR_eDP)
clamp_bpp = 18;

if (bpp > clamp_bpp) {
DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of %d\n",
bpp, clamp_bpp);
pipe_config->pipe_bpp = clamp_bpp;
}
/* Clamp bpp to 8 on screens without EDID 1.4 */
if (connector->base.display_info.bpc == 0 && bpp > 24) {
DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n",
bpp);
pipe_config->pipe_bpp = 24;
}
}

Expand Down
25 changes: 11 additions & 14 deletions drivers/gpu/drm/i915/intel_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous
struct intel_fbdev *ifbdev = dev_priv->fbdev;
struct fb_info *info;

if (!ifbdev)
if (!ifbdev || !ifbdev->fb)
return;

info = ifbdev->helper.fbdev;
Expand Down Expand Up @@ -827,31 +827,28 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous

void intel_fbdev_output_poll_changed(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
if (dev_priv->fbdev)
drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;

if (ifbdev && ifbdev->fb)
drm_fb_helper_hotplug_event(&ifbdev->helper);
}

void intel_fbdev_restore_mode(struct drm_device *dev)
{
int ret;
struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_fbdev *ifbdev = dev_priv->fbdev;
struct drm_fb_helper *fb_helper;
struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;

if (!ifbdev)
return;

intel_fbdev_sync(ifbdev);
if (!ifbdev->fb)
return;

fb_helper = &ifbdev->helper;

ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
if (ret) {
if (drm_fb_helper_restore_fbdev_mode_unlocked(&ifbdev->helper)) {
DRM_DEBUG("failed to restore crtc mode\n");
} else {
mutex_lock(&fb_helper->dev->struct_mutex);
mutex_lock(&dev->struct_mutex);
intel_fb_obj_invalidate(ifbdev->fb->obj, ORIGIN_GTT);
mutex_unlock(&fb_helper->dev->struct_mutex);
mutex_unlock(&dev->struct_mutex);
}
}
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4892,7 +4892,8 @@ void gen6_rps_idle(struct drm_i915_private *dev_priv)
else
gen6_set_rps(dev_priv, dev_priv->rps.idle_freq);
dev_priv->rps.last_adj = 0;
I915_WRITE(GEN6_PMINTRMSK, 0xffffffff);
I915_WRITE(GEN6_PMINTRMSK,
gen6_sanitize_rps_pm_mask(dev_priv, ~0));
}
mutex_unlock(&dev_priv->rps.hw_lock);

Expand Down
Loading