~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/nouveau/nv50_crtc.c

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                OUT_RING(evo, nv_crtc->lut.depth == 8 ?
105
105
                                NV50_EVO_CRTC_CLUT_MODE_OFF :
106
106
                                NV50_EVO_CRTC_CLUT_MODE_ON);
107
 
                OUT_RING(evo, (nv_crtc->lut.nvbo->bo.mem.start << PAGE_SHIFT) >> 8);
 
107
                OUT_RING(evo, nv_crtc->lut.nvbo->bo.offset >> 8);
108
108
                if (dev_priv->chipset != 0x50) {
109
109
                        BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1);
110
110
                        OUT_RING(evo, NvEvoVRAM);
329
329
 
330
330
        drm_crtc_cleanup(&nv_crtc->base);
331
331
 
332
 
        nv50_cursor_fini(nv_crtc);
333
 
 
334
332
        nouveau_bo_unmap(nv_crtc->lut.nvbo);
335
333
        nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo);
336
334
        nouveau_bo_unmap(nv_crtc->cursor.nvbo);
372
370
 
373
371
        nouveau_bo_unmap(cursor);
374
372
 
375
 
        nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT);
 
373
        nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.offset);
376
374
        nv_crtc->cursor.show(nv_crtc, true);
377
375
 
378
376
out:
519
517
        struct drm_device *dev = nv_crtc->base.dev;
520
518
        struct drm_nouveau_private *dev_priv = dev->dev_private;
521
519
        struct nouveau_channel *evo = nv50_display(dev)->master;
522
 
        struct drm_framebuffer *drm_fb = nv_crtc->base.fb;
523
 
        struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
 
520
        struct drm_framebuffer *drm_fb;
 
521
        struct nouveau_framebuffer *fb;
524
522
        int ret;
525
523
 
526
524
        NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
527
525
 
 
526
        /* no fb bound */
 
527
        if (!atomic && !crtc->fb) {
 
528
                NV_DEBUG_KMS(dev, "No FB bound\n");
 
529
                return 0;
 
530
        }
 
531
 
528
532
        /* If atomic, we want to switch to the fb we were passed, so
529
533
         * now we update pointers to do that.  (We don't pin; just
530
534
         * assume we're already pinned and update the base address.)
533
537
                drm_fb = passed_fb;
534
538
                fb = nouveau_framebuffer(passed_fb);
535
539
        } else {
 
540
                drm_fb = crtc->fb;
 
541
                fb = nouveau_framebuffer(crtc->fb);
536
542
                /* If not atomic, we can go ahead and pin, and unpin the
537
543
                 * old fb we were passed.
538
544
                 */
546
552
                }
547
553
        }
548
554
 
549
 
        nv_crtc->fb.offset = fb->nvbo->bo.mem.start << PAGE_SHIFT;
 
555
        nv_crtc->fb.offset = fb->nvbo->bo.offset;
550
556
        nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo);
551
557
        nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8;
552
558
        if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) {
747
753
        }
748
754
        nv_crtc->lut.depth = 0;
749
755
 
750
 
        ret = nouveau_bo_new(dev, NULL, 4096, 0x100, TTM_PL_FLAG_VRAM,
 
756
        ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM,
751
757
                             0, 0x0000, &nv_crtc->lut.nvbo);
752
758
        if (!ret) {
753
759
                ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM);
773
779
        drm_crtc_helper_add(&nv_crtc->base, &nv50_crtc_helper_funcs);
774
780
        drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);
775
781
 
776
 
        ret = nouveau_bo_new(dev, NULL, 64*64*4, 0x100, TTM_PL_FLAG_VRAM,
 
782
        ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM,
777
783
                             0, 0x0000, &nv_crtc->cursor.nvbo);
778
784
        if (!ret) {
779
785
                ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM);