summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Chauvet <kwizart@gmail.com>2014-05-29 23:03:51 +0200
committerNicolas Chauvet <kwizart@gmail.com>2014-05-29 23:03:51 +0200
commit6237ea455ef14930528c82ec5adb6cd3a76c0399 (patch)
treee5697733b221889f9d721ca2baa0df0f373c3fc2
parentbc83297fd5cb14ff1f07c79868f50665dde26396 (diff)
downloadkernel-6237ea455ef14930528c82ec5adb6cd3a76c0399.tar.gz
kernel-6237ea455ef14930528c82ec5adb6cd3a76c0399.tar.xz
kernel-6237ea455ef14930528c82ec5adb6cd3a76c0399.zip
Backport patches from Tegra
-rw-r--r--0003-To-implement-hotplug-detection-in-a-race-free-manner.patch47
-rw-r--r--Update_tegra_drm-linux-next.patch558
-rw-r--r--kernel.spec5
3 files changed, 4 insertions, 606 deletions
diff --git a/0003-To-implement-hotplug-detection-in-a-race-free-manner.patch b/0003-To-implement-hotplug-detection-in-a-race-free-manner.patch
index ec466db6..babde929 100644
--- a/0003-To-implement-hotplug-detection-in-a-race-free-manner.patch
+++ b/0003-To-implement-hotplug-detection-in-a-race-free-manner.patch
@@ -67,37 +67,6 @@ index 2113894..cba45c7 100644
ret = drm_fb_helper_init(dev, &afbdev->helper,
1, 1);
if (ret) {
-diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
-index 17e5c17..19cf3e9 100644
---- a/drivers/gpu/drm/bochs/bochs_fbdev.c
-+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
-@@ -189,7 +189,8 @@ int bochs_fbdev_init(struct bochs_device *bochs)
- {
- int ret;
-
-- bochs->fb.helper.funcs = &bochs_fb_helper_funcs;
-+ drm_fb_helper_prepare(bochs->dev, &bochs->fb.helper,
-+ &bochs_fb_helper_funcs);
-
- ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper,
- 1, 1);
-diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
-index 2bd0291..2a135f2 100644
---- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
-+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
-@@ -306,9 +306,11 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
- return -ENOMEM;
-
- cdev->mode_info.gfbdev = gfbdev;
-- gfbdev->helper.funcs = &cirrus_fb_helper_funcs;
- spin_lock_init(&gfbdev->dirty_lock);
-
-+ drm_fb_helper_prepare(cdev->dev, &gfbdev->helper,
-+ &cirrus_fb_helper_funcs);
-+
- ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper,
- cdev->num_crtc, CIRRUSFB_CONN_LIMIT);
- if (ret) {
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index b74f9e5..acbbd23 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -118,22 +87,6 @@ diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 80ce92a..7788f11 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
-@@ -49,10 +49,11 @@ static LIST_HEAD(kernel_fb_helper_list);
- * helper functions used by many drivers to implement the kernel mode setting
- * interfaces.
- *
-- * Initialization is done as a three-step process with drm_fb_helper_init(),
-- * drm_fb_helper_single_add_all_connectors() and drm_fb_helper_initial_config().
-- * Drivers with fancier requirements than the default behaviour can override the
-- * second step with their own code. Teardown is done with drm_fb_helper_fini().
-+ * Initialization is done as a four-step process with drm_fb_helper_prepare(),
-+ * drm_fb_helper_init(), drm_fb_helper_single_add_all_connectors() and
-+ * drm_fb_helper_initial_config(). Drivers with fancier requirements than the
-+ * default behaviour can override the second step with their own code.
-+ * Teardown is done with drm_fb_helper_fini().
- *
- * At runtime drivers should restore the fbdev console by calling
- * drm_fb_helper_restore_fbdev_mode() from their ->lastclose callback. They
@@ -502,6 +503,33 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper)
}
diff --git a/Update_tegra_drm-linux-next.patch b/Update_tegra_drm-linux-next.patch
index c31314de..0a861dfc 100644
--- a/Update_tegra_drm-linux-next.patch
+++ b/Update_tegra_drm-linux-next.patch
@@ -36,397 +36,6 @@ index 292a79d..48e38ba 100644
obj-y += i2c/
obj-y += panel/
+obj-y += bridge/
-diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
-index d8e3982..81c34f9 100644
---- a/drivers/gpu/drm/armada/armada_crtc.c
-+++ b/drivers/gpu/drm/armada/armada_crtc.c
-@@ -478,11 +478,12 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
- unsigned i;
- bool interlaced;
-
-- drm_framebuffer_reference(crtc->fb);
-+ drm_framebuffer_reference(crtc->primary->fb);
-
- interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE);
-
-- i = armada_drm_crtc_calc_fb(dcrtc->crtc.fb, x, y, regs, interlaced);
-+ i = armada_drm_crtc_calc_fb(dcrtc->crtc.primary->fb,
-+ x, y, regs, interlaced);
-
- rm = adj->crtc_hsync_start - adj->crtc_hdisplay;
- lm = adj->crtc_htotal - adj->crtc_hsync_end;
-@@ -567,10 +568,10 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
- }
-
- val = CFG_GRA_ENA | CFG_GRA_HSMOOTH;
-- val |= CFG_GRA_FMT(drm_fb_to_armada_fb(dcrtc->crtc.fb)->fmt);
-- val |= CFG_GRA_MOD(drm_fb_to_armada_fb(dcrtc->crtc.fb)->mod);
-+ val |= CFG_GRA_FMT(drm_fb_to_armada_fb(dcrtc->crtc.primary->fb)->fmt);
-+ val |= CFG_GRA_MOD(drm_fb_to_armada_fb(dcrtc->crtc.primary->fb)->mod);
-
-- if (drm_fb_to_armada_fb(dcrtc->crtc.fb)->fmt > CFG_420)
-+ if (drm_fb_to_armada_fb(dcrtc->crtc.primary->fb)->fmt > CFG_420)
- val |= CFG_PALETTE_ENA;
-
- if (interlaced)
-@@ -608,7 +609,7 @@ static int armada_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
- struct armada_regs regs[4];
- unsigned i;
-
-- i = armada_drm_crtc_calc_fb(crtc->fb, crtc->x, crtc->y, regs,
-+ i = armada_drm_crtc_calc_fb(crtc->primary->fb, crtc->x, crtc->y, regs,
- dcrtc->interlaced);
- armada_reg_queue_end(regs, i);
-
-@@ -616,7 +617,7 @@ static int armada_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
- wait_event(dcrtc->frame_wait, !dcrtc->frame_work);
-
- /* Take a reference to the new fb as we're using it */
-- drm_framebuffer_reference(crtc->fb);
-+ drm_framebuffer_reference(crtc->primary->fb);
-
- /* Update the base in the CRTC */
- armada_drm_crtc_update_regs(dcrtc, regs);
-@@ -637,7 +638,7 @@ static void armada_drm_crtc_disable(struct drm_crtc *crtc)
- struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
-
- armada_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
-- armada_drm_crtc_finish_fb(dcrtc, crtc->fb, true);
-+ armada_drm_crtc_finish_fb(dcrtc, crtc->primary->fb, true);
-
- /* Power down most RAMs and FIFOs */
- writel_relaxed(CFG_PDWN256x32 | CFG_PDWN256x24 | CFG_PDWN256x8 |
-@@ -678,6 +679,7 @@ static void armada_load_cursor_argb(void __iomem *base, uint32_t *pix,
- base + LCD_SPU_SRAM_WRDAT);
- writel_relaxed(addr | SRAM_WRITE,
- base + LCD_SPU_SRAM_CTRL);
-+ readl_relaxed(base + LCD_SPU_HWC_OVSA_HPXL_VLN);
- addr += 1;
- if ((addr & 0x00ff) == 0)
- addr += 0xf00;
-@@ -904,7 +906,7 @@ static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
- int ret;
-
- /* We don't support changing the pixel format */
-- if (fb->pixel_format != crtc->fb->pixel_format)
-+ if (fb->pixel_format != crtc->primary->fb->pixel_format)
- return -EINVAL;
-
- work = kmalloc(sizeof(*work), GFP_KERNEL);
-@@ -912,7 +914,7 @@ static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
- return -ENOMEM;
-
- work->event = event;
-- work->old_fb = dcrtc->crtc.fb;
-+ work->old_fb = dcrtc->crtc.primary->fb;
-
- i = armada_drm_crtc_calc_fb(fb, crtc->x, crtc->y, work->regs,
- dcrtc->interlaced);
-@@ -941,7 +943,7 @@ static int armada_drm_crtc_page_flip(struct drm_crtc *crtc,
- * will _not_ drop that reference on successful return from this
- * function. Simply mark this new framebuffer as the current one.
- */
-- dcrtc->crtc.fb = fb;
-+ dcrtc->crtc.primary->fb = fb;
-
- /*
- * Finally, if the display is blanked, we won't receive an
-diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
-index 32982da..567cfbd 100644
---- a/drivers/gpu/drm/armada/armada_drv.c
-+++ b/drivers/gpu/drm/armada/armada_drv.c
-@@ -173,7 +173,7 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags)
- if (ret)
- goto err_kms;
-
-- ret = drm_irq_install(dev);
-+ ret = drm_irq_install(dev, platform_get_irq(dev->platformdev, 0));
- if (ret)
- goto err_kms;
-
-diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
-index 5137f15..2ba39ac 100644
---- a/drivers/gpu/drm/ast/ast_drv.c
-+++ b/drivers/gpu/drm/ast/ast_drv.c
-@@ -198,7 +198,6 @@ static const struct file_operations ast_fops = {
-
- static struct drm_driver driver = {
- .driver_features = DRIVER_MODESET | DRIVER_GEM,
-- .dev_priv_size = 0,
-
- .load = ast_driver_load,
- .unload = ast_driver_unload,
-diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
-index 50535fd..01bf9e7 100644
---- a/drivers/gpu/drm/ast/ast_main.c
-+++ b/drivers/gpu/drm/ast/ast_main.c
-@@ -411,16 +411,13 @@ static void ast_bo_unref(struct ast_bo **bo)
-
- tbo = &((*bo)->bo);
- ttm_bo_unref(&tbo);
-- if (tbo == NULL)
-- *bo = NULL;
--
-+ *bo = NULL;
- }
-+
- void ast_gem_free_object(struct drm_gem_object *obj)
- {
- struct ast_bo *ast_bo = gem_to_ast_bo(obj);
-
-- if (!ast_bo)
-- return;
- ast_bo_unref(&ast_bo);
- }
-
-diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
-index cca063b..a4afdc8 100644
---- a/drivers/gpu/drm/ast/ast_mode.c
-+++ b/drivers/gpu/drm/ast/ast_mode.c
-@@ -81,7 +81,7 @@ static bool ast_get_vbios_mode_info(struct drm_crtc *crtc, struct drm_display_mo
- u32 refresh_rate_index = 0, mode_id, color_index, refresh_rate;
- u32 hborder, vborder;
-
-- switch (crtc->fb->bits_per_pixel) {
-+ switch (crtc->primary->fb->bits_per_pixel) {
- case 8:
- vbios_mode->std_table = &vbios_stdtable[VGAModeIndex];
- color_index = VGAModeIndex - 1;
-@@ -176,7 +176,7 @@ static bool ast_get_vbios_mode_info(struct drm_crtc *crtc, struct drm_display_mo
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8e, mode_id & 0xff);
-
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8);
-- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, crtc->fb->bits_per_pixel);
-+ ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, crtc->primary->fb->bits_per_pixel);
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x93, adjusted_mode->clock / 1000);
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x94, adjusted_mode->crtc_hdisplay);
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x95, adjusted_mode->crtc_hdisplay >> 8);
-@@ -340,7 +340,7 @@ static void ast_set_offset_reg(struct drm_crtc *crtc)
-
- u16 offset;
-
-- offset = crtc->fb->pitches[0] >> 3;
-+ offset = crtc->primary->fb->pitches[0] >> 3;
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x13, (offset & 0xff));
- ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xb0, (offset >> 8) & 0x3f);
- }
-@@ -365,7 +365,7 @@ static void ast_set_ext_reg(struct drm_crtc *crtc, struct drm_display_mode *mode
- struct ast_private *ast = crtc->dev->dev_private;
- u8 jregA0 = 0, jregA3 = 0, jregA8 = 0;
-
-- switch (crtc->fb->bits_per_pixel) {
-+ switch (crtc->primary->fb->bits_per_pixel) {
- case 8:
- jregA0 = 0x70;
- jregA3 = 0x01;
-@@ -418,7 +418,7 @@ static void ast_set_sync_reg(struct drm_device *dev, struct drm_display_mode *mo
- static bool ast_set_dac_reg(struct drm_crtc *crtc, struct drm_display_mode *mode,
- struct ast_vbios_mode_info *vbios_mode)
- {
-- switch (crtc->fb->bits_per_pixel) {
-+ switch (crtc->primary->fb->bits_per_pixel) {
- case 8:
- break;
- default:
-@@ -490,7 +490,7 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc,
- ast_bo_unreserve(bo);
- }
-
-- ast_fb = to_ast_framebuffer(crtc->fb);
-+ ast_fb = to_ast_framebuffer(crtc->primary->fb);
- obj = ast_fb->obj;
- bo = gem_to_ast_bo(obj);
-
-diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index 977cfb3..635f6ff 100644
---- a/drivers/gpu/drm/ast/ast_post.c
-+++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -572,7 +572,7 @@ static u32 cbr_scan2(struct ast_private *ast)
- for (loop = 0; loop < CBR_PASSNUM2; loop++) {
- if ((data = cbr_test2(ast)) != 0) {
- data2 &= data;
-- if (!data)
-+ if (!data2)
- return 0;
- break;
- }
-diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c
-index 4ea9b17..b824622 100644
---- a/drivers/gpu/drm/ast/ast_ttm.c
-+++ b/drivers/gpu/drm/ast/ast_ttm.c
-@@ -259,7 +259,9 @@ int ast_mm_init(struct ast_private *ast)
-
- ret = ttm_bo_device_init(&ast->ttm.bdev,
- ast->ttm.bo_global_ref.ref.object,
-- &ast_bo_driver, DRM_FILE_PAGE_OFFSET,
-+ &ast_bo_driver,
-+ dev->anon_inode->i_mapping,
-+ DRM_FILE_PAGE_OFFSET,
- true);
- if (ret) {
- DRM_ERROR("Error initialising bo driver; %d\n", ret);
-@@ -324,7 +326,6 @@ int ast_bo_create(struct drm_device *dev, int size, int align,
- }
-
- astbo->bo.bdev = &ast->ttm.bdev;
-- astbo->bo.bdev->dev_mapping = dev->dev_mapping;
-
- ast_ttm_placement(astbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);
-
-diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h
-index 741965c..7eb52dd 100644
---- a/drivers/gpu/drm/bochs/bochs.h
-+++ b/drivers/gpu/drm/bochs/bochs.h
-@@ -1,5 +1,6 @@
- #include <linux/io.h>
- #include <linux/fb.h>
-+#include <linux/console.h>
-
- #include <drm/drmP.h>
- #include <drm/drm_crtc.h>
-@@ -87,8 +88,6 @@ struct bochs_device {
- struct bochs_framebuffer gfb;
- struct drm_fb_helper helper;
- int size;
-- int x1, y1, x2, y2; /* dirty rect */
-- spinlock_t dirty_lock;
- bool initialized;
- } fb;
- };
-diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
-index 395bba2..9c13df2 100644
---- a/drivers/gpu/drm/bochs/bochs_drv.c
-+++ b/drivers/gpu/drm/bochs/bochs_drv.c
-@@ -95,6 +95,49 @@ static struct drm_driver bochs_driver = {
- };
-
- /* ---------------------------------------------------------------------- */
-+/* pm interface */
-+
-+static int bochs_pm_suspend(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
-+ struct bochs_device *bochs = drm_dev->dev_private;
-+
-+ drm_kms_helper_poll_disable(drm_dev);
-+
-+ if (bochs->fb.initialized) {
-+ console_lock();
-+ fb_set_suspend(bochs->fb.helper.fbdev, 1);
-+ console_unlock();
-+ }
-+
-+ return 0;
-+}
-+
-+static int bochs_pm_resume(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
-+ struct bochs_device *bochs = drm_dev->dev_private;
-+
-+ drm_helper_resume_force_mode(drm_dev);
-+
-+ if (bochs->fb.initialized) {
-+ console_lock();
-+ fb_set_suspend(bochs->fb.helper.fbdev, 0);
-+ console_unlock();
-+ }
-+
-+ drm_kms_helper_poll_enable(drm_dev);
-+ return 0;
-+}
-+
-+static const struct dev_pm_ops bochs_pm_ops = {
-+ SET_SYSTEM_SLEEP_PM_OPS(bochs_pm_suspend,
-+ bochs_pm_resume)
-+};
-+
-+/* ---------------------------------------------------------------------- */
- /* pci interface */
-
- static int bochs_kick_out_firmware_fb(struct pci_dev *pdev)
-@@ -155,6 +198,7 @@ static struct pci_driver bochs_pci_driver = {
- .id_table = bochs_pci_tbl,
- .probe = bochs_pci_probe,
- .remove = bochs_pci_remove,
-+ .driver.pm = &bochs_pm_ops,
- };
-
- /* ---------------------------------------------------------------------- */
-diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
-index 4da5206..561b844 100644
---- a/drivers/gpu/drm/bochs/bochs_fbdev.c
-+++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
-@@ -190,7 +190,6 @@ int bochs_fbdev_init(struct bochs_device *bochs)
- int ret;
-
- bochs->fb.helper.funcs = &bochs_fb_helper_funcs;
-- spin_lock_init(&bochs->fb.dirty_lock);
-
- ret = drm_fb_helper_init(bochs->dev, &bochs->fb.helper,
- 1, 1);
-diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
-index 62ec7d4..dcf2e55 100644
---- a/drivers/gpu/drm/bochs/bochs_kms.c
-+++ b/drivers/gpu/drm/bochs/bochs_kms.c
-@@ -62,10 +62,10 @@ static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
- }
- }
-
-- if (WARN_ON(crtc->fb == NULL))
-+ if (WARN_ON(crtc->primary->fb == NULL))
- return -EINVAL;
-
-- bochs_fb = to_bochs_framebuffer(crtc->fb);
-+ bochs_fb = to_bochs_framebuffer(crtc->primary->fb);
- bo = gem_to_bochs_bo(bochs_fb->obj);
- ret = ttm_bo_reserve(&bo->bo, true, false, false, 0);
- if (ret)
-diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
-index ce68587..b9a695d 100644
---- a/drivers/gpu/drm/bochs/bochs_mm.c
-+++ b/drivers/gpu/drm/bochs/bochs_mm.c
-@@ -225,7 +225,9 @@ int bochs_mm_init(struct bochs_device *bochs)
-
- ret = ttm_bo_device_init(&bochs->ttm.bdev,
- bochs->ttm.bo_global_ref.ref.object,
-- &bochs_bo_driver, DRM_FILE_PAGE_OFFSET,
-+ &bochs_bo_driver,
-+ bochs->dev->anon_inode->i_mapping,
-+ DRM_FILE_PAGE_OFFSET,
- true);
- if (ret) {
- DRM_ERROR("Error initialising bo driver; %d\n", ret);
-@@ -359,7 +361,7 @@ static int bochs_bo_create(struct drm_device *dev, int size, int align,
- }
-
- bochsbo->bo.bdev = &bochs->ttm.bdev;
-- bochsbo->bo.bdev->dev_mapping = dev->dev_mapping;
-+ bochsbo->bo.bdev->dev_mapping = dev->anon_inode->i_mapping;
-
- bochs_ttm_placement(bochsbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);
-
-@@ -432,17 +434,13 @@ static void bochs_bo_unref(struct bochs_bo **bo)
-
- tbo = &((*bo)->bo);
- ttm_bo_unref(&tbo);
-- if (tbo == NULL)
-- *bo = NULL;
--
-+ *bo = NULL;
- }
-
- void bochs_gem_free_object(struct drm_gem_object *obj)
- {
- struct bochs_bo *bochs_bo = gem_to_bochs_bo(obj);
-
-- if (!bochs_bo)
-- return;
- bochs_bo_unref(&bochs_bo);
- }
-
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
new file mode 100644
index 0000000..884923f
@@ -803,173 +412,6 @@ index 0000000..b171901
+ return ret;
+}
+EXPORT_SYMBOL(ptn3460_init);
-diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
-index 953fc8a..08ce520 100644
---- a/drivers/gpu/drm/cirrus/cirrus_drv.c
-+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
-@@ -11,6 +11,7 @@
- #include <linux/module.h>
- #include <linux/console.h>
- #include <drm/drmP.h>
-+#include <drm/drm_crtc_helper.h>
-
- #include "cirrus_drv.h"
-
-@@ -75,6 +76,41 @@ static void cirrus_pci_remove(struct pci_dev *pdev)
- drm_put_dev(dev);
- }
-
-+static int cirrus_pm_suspend(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
-+ struct cirrus_device *cdev = drm_dev->dev_private;
-+
-+ drm_kms_helper_poll_disable(drm_dev);
-+
-+ if (cdev->mode_info.gfbdev) {
-+ console_lock();
-+ fb_set_suspend(cdev->mode_info.gfbdev->helper.fbdev, 1);
-+ console_unlock();
-+ }
-+
-+ return 0;
-+}
-+
-+static int cirrus_pm_resume(struct device *dev)
-+{
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct drm_device *drm_dev = pci_get_drvdata(pdev);
-+ struct cirrus_device *cdev = drm_dev->dev_private;
-+
-+ drm_helper_resume_force_mode(drm_dev);
-+
-+ if (cdev->mode_info.gfbdev) {
-+ console_lock();
-+ fb_set_suspend(cdev->mode_info.gfbdev->helper.fbdev, 0);
-+ console_unlock();
-+ }
-+
-+ drm_kms_helper_poll_enable(drm_dev);
-+ return 0;
-+}
-+
- static const struct file_operations cirrus_driver_fops = {
- .owner = THIS_MODULE,
- .open = drm_open,
-@@ -103,11 +139,17 @@ static struct drm_driver driver = {
- .dumb_destroy = drm_gem_dumb_destroy,
- };
-
-+static const struct dev_pm_ops cirrus_pm_ops = {
-+ SET_SYSTEM_SLEEP_PM_OPS(cirrus_pm_suspend,
-+ cirrus_pm_resume)
-+};
-+
- static struct pci_driver cirrus_pci_driver = {
- .name = DRIVER_NAME,
- .id_table = pciidlist,
- .probe = cirrus_pci_probe,
- .remove = cirrus_pci_remove,
-+ .driver.pm = &cirrus_pm_ops,
- };
-
- static int __init cirrus_init(void)
-diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c
-index 4b0170c..99c1983 100644
---- a/drivers/gpu/drm/cirrus/cirrus_main.c
-+++ b/drivers/gpu/drm/cirrus/cirrus_main.c
-@@ -264,17 +264,13 @@ static void cirrus_bo_unref(struct cirrus_bo **bo)
-
- tbo = &((*bo)->bo);
- ttm_bo_unref(&tbo);
-- if (tbo == NULL)
-- *bo = NULL;
--
-+ *bo = NULL;
- }
-
- void cirrus_gem_free_object(struct drm_gem_object *obj)
- {
- struct cirrus_bo *cirrus_bo = gem_to_cirrus_bo(obj);
-
-- if (!cirrus_bo)
-- return;
- cirrus_bo_unref(&cirrus_bo);
- }
-
-diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
-index 530f78f..f59433b 100644
---- a/drivers/gpu/drm/cirrus/cirrus_mode.c
-+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
-@@ -149,7 +149,7 @@ static int cirrus_crtc_do_set_base(struct drm_crtc *crtc,
- cirrus_bo_unreserve(bo);
- }
-
-- cirrus_fb = to_cirrus_framebuffer(crtc->fb);
-+ cirrus_fb = to_cirrus_framebuffer(crtc->primary->fb);
- obj = cirrus_fb->obj;
- bo = gem_to_cirrus_bo(obj);
-
-@@ -268,7 +268,7 @@ static int cirrus_crtc_mode_set(struct drm_crtc *crtc,
- sr07 = RREG8(SEQ_DATA);
- sr07 &= 0xe0;
- hdr = 0;
-- switch (crtc->fb->bits_per_pixel) {
-+ switch (crtc->primary->fb->bits_per_pixel) {
- case 8:
- sr07 |= 0x11;
- break;
-@@ -291,13 +291,13 @@ static int cirrus_crtc_mode_set(struct drm_crtc *crtc,
- WREG_SEQ(0x7, sr07);
-
- /* Program the pitch */
-- tmp = crtc->fb->pitches[0] / 8;
-+ tmp = crtc->primary->fb->pitches[0] / 8;
- WREG_CRT(VGA_CRTC_OFFSET, tmp);
-
- /* Enable extended blanking and pitch bits, and enable full memory */
- tmp = 0x22;
-- tmp |= (crtc->fb->pitches[0] >> 7) & 0x10;
-- tmp |= (crtc->fb->pitches[0] >> 6) & 0x40;
-+ tmp |= (crtc->primary->fb->pitches[0] >> 7) & 0x10;
-+ tmp |= (crtc->primary->fb->pitches[0] >> 6) & 0x40;
- WREG_CRT(0x1b, tmp);
-
- /* Enable high-colour modes */
-@@ -308,6 +308,9 @@ static int cirrus_crtc_mode_set(struct drm_crtc *crtc,
-
- WREG_HDR(hdr);
- cirrus_crtc_do_set_base(crtc, old_fb, x, y, 0);
-+
-+ /* Unblank (needed on S3 resume, vgabios doesn't do it then) */
-+ outb(0x20, 0x3c0);
- return 0;
- }
-
-diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c
-index 8b37c25..92e6b77 100644
---- a/drivers/gpu/drm/cirrus/cirrus_ttm.c
-+++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c
-@@ -259,7 +259,9 @@ int cirrus_mm_init(struct cirrus_device *cirrus)
-
- ret = ttm_bo_device_init(&cirrus->ttm.bdev,
- cirrus->ttm.bo_global_ref.ref.object,
-- &cirrus_bo_driver, DRM_FILE_PAGE_OFFSET,
-+ &cirrus_bo_driver,
-+ dev->anon_inode->i_mapping,
-+ DRM_FILE_PAGE_OFFSET,
- true);
- if (ret) {
- DRM_ERROR("Error initialising bo driver; %d\n", ret);
-@@ -329,7 +331,6 @@ int cirrus_bo_create(struct drm_device *dev, int size, int align,
- }
-
- cirrusbo->bo.bdev = &cirrus->ttm.bdev;
-- cirrusbo->bo.bdev->dev_mapping = dev->dev_mapping;
-
- cirrus_ttm_placement(cirrusbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);
-
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index edec31f..ef7f019 100644
--- a/drivers/gpu/drm/drm_bufs.c
diff --git a/kernel.spec b/kernel.spec
index e2f01d4b..ca0639dc 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -708,6 +708,8 @@ Patch21204: 0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
Patch21205: 0005-NOT_FOR_UPSTREAM-staging-nvec-update-TODO.patch
Patch21206: Update-panel-simple_3.15.patch
+Patch21207: Update_tegra_drm-linux-next.patch
+
#http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/253575.html
Patch21210: arm-tegra-reboot-rcm.patch
@@ -1358,7 +1360,8 @@ ApplyPatch 0002-NOT_FOR_UPSTREAM-staging-nvec-move-led-init-out-of-p.patch
ApplyPatch 0003-NOT_FOR_UPSTREAM-staging-nvec-add-support-for-lid-an.patch
ApplyPatch 0004-NOT_FOR_UPSTREAM-staging-nvec-remove-lid-and-power-e.patch
ApplyPatch 0005-NOT_FOR_UPSTREAM-staging-nvec-update-TODO.patch
-ApplyPatch Update-panel-simple_3.15.patch
+
+ApplyPatch Update_tegra_drm-linux-next.patch
ApplyPatch arm-tegra-reboot-rcm.patch
ApplyPatch 0001-Some-drivers-need-to-be-able-to-have-a-perfect-race-.patch