14 Dec, 2011

1 commit


02 Dec, 2011

1 commit


28 Nov, 2011

1 commit

  • * 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung:
    drm/exynos: fixed wrong err ptr usage and destroy call in exeception
    drm/exynos: Add disable of manager
    drm/exynos: include linux/module.h
    drm/exynos: fix vblank bug.
    drm/exynos: changed buffer structure.
    drm/exynos: removed unnecessary variable.
    drm/exynos: use gem create function generically
    drm/exynos: checked for null pointer
    drm/exynos: added crtc dpms for disable crtc
    drm/exynos: removed meaningless parameter from fbdev update
    drm/exynos: restored kernel_fb_list when reiniting fb_helper
    drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
    drm/exynos: added manager object to connector
    drm/exynos: fixed converting between display mode and timing
    drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
    drm/exynos: added kms poll for handling hpd event

    Dave Airlie
     

23 Nov, 2011

1 commit

  • There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
    if userspace passes in a large num_clips. The call to kmalloc would
    allocate a small buffer, and the call to fb->funcs->dirty may result
    in a memory corruption.

    Reported-by: Haogang Chen
    Signed-off-by: Xi Wang
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Xi Wang
     

20 Nov, 2011

1 commit

  • This adds a new optional chunk to the CS ioctl that specifies optional flags
    to the CS parser. Why this is useful is explained below. Note that some regs
    no longer need the NOP relocation packet if this feature is enabled.
    Tested on r300g and r600g with this flag disabled and enabled.

    Assume there are two contexts sharing the same mipmapped tiled texture.
    One context wants to render into the first mipmap and the other one
    wants to render into the last mipmap. As you probably know, the hardware
    has a MACRO_SWITCH feature, which turns off macro tiling for small mipmaps,
    but that only applies to samplers.
    (at least on r300-r500, though later hardware likely behaves the same)

    So we want to just re-set the tiling flags before rendering (writing
    packets), right? ... No. The contexts run in parallel, so they may
    set the tiling flags simultaneously and then fire their command streams
    also simultaneously. The last one setting the flags wins, the other one
    loses.

    Another problem is when one context wants to render into the first and
    the last mipmap in one CS. Impossible. It must flush before changing
    tiling flags and do the rendering into the smaller mipmaps in another CS.

    Yet another problem is that writing copy_blit in userspace would be a mess
    involving re-setting tiling flags to please the kernel, and causing races
    with other contexts at the same time.

    The only way out of this is to send tiling flags with each CS, ideally
    with each relocation. But we already do that through the registers.
    So let's just use what we have in the registers.

    Signed-off-by: Marek Olšák
    Signed-off-by: Dave Airlie

    Marek Olšák
     

16 Nov, 2011

1 commit


15 Nov, 2011

1 commit

  • this patch addes exynos_drm_gem_init() creating and initialzing a gem.
    allocation functions could use this function to create new gem and
    it changes size type of exynos_drm_gem_create structure to 64bit
    and also corrects comments to exynos_drm_gem_create structure.

    Signed-off-by: Inki Dae
    Signed-off-by: Kyungmin Park

    Inki Dae
     

11 Nov, 2011

2 commits


08 Nov, 2011

1 commit

  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (40 commits)
    vmwgfx: Snoop DMA transfers with non-covering sizes
    vmwgfx: Move the prefered mode first in the list
    vmwgfx: Unreference surface on cursor error path
    vmwgfx: Free prefered mode on error path
    vmwgfx: Use pointer return error codes
    vmwgfx: Fix hw cursor position
    vmwgfx: Infrastructure for explicit placement
    vmwgfx: Make the preferred autofit mode have a 60Hz vrefresh
    vmwgfx: Remove screen object active list
    vmwgfx: Screen object cleanups
    drm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2
    drm/radeon/kms: don't poll forever if MC GDDR link training fails
    drm/radeon/kms: fix DP setup on TRAVIS bridges
    drm/radeon/kms: set HPD polarity in hpd_init()
    drm/radeon/kms: add MSI module parameter
    drm/radeon/kms: Add MSI quirk for Dell RS690
    drm/radeon/kms: Add MSI quirk for HP RS690
    drm/radeon/kms: split MSI check into a separate function
    vmwgfx: Reinstate the update_layout ioctl
    drm/radeon/kms: always do extended edid probe
    ...

    Linus Torvalds
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

02 Nov, 2011

3 commits

  • We need to redefine a connector as "connected" if it matches a window
    in the host preferred GUI layout.
    Otherwise "smart" window managers would turn on Xorg outputs that we don't
    want to be on.

    This reinstates the update_layout and adds the following information to
    the modesetting system.
    a) Connection status Equivalent to real hardware connection status
    b) Preferred mode Equivalent to real hardware reading EDID
    c) Host window position Equivalent to a real hardware scanout address
    dynamic register.

    It should be noted that there is no assumption here about what should be
    displayed and where. Only how to access the host windows.

    This also bumps minor to signal availability of the new IOCTL.

    Based on code originally written by Jakob Bornecrantz

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • This should make eDP more reliable.

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • This will allow us to attach various properties specific to virtual
    monitors in the future.

    Note that we don't export an EDID property for "Virtual" connectors.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     

01 Nov, 2011

2 commits

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The pretty much brings in the kitchen sink along
    with it, so it should be avoided wherever reasonably possible in
    terms of being included from other commonly used
    files, as it results in a measureable increase on compile times.

    The worst culprit was probably device.h since it is used everywhere.
    This file also had an implicit dependency/usage of mutex.h which was
    masked by module.h, and is also fixed here at the same time.

    There are over a dozen other headers that simply declare the
    struct instead of pulling in the whole file, so follow their lead
    and simply make it a few more.

    Most of the implicit dependencies on module.h being present by
    these headers pulling it in have been now weeded out, so we can
    finally make this change with hopefully minimal breakage.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

28 Oct, 2011

2 commits


24 Oct, 2011

1 commit

  • * 'drm-intel-next' of git://people.freedesktop.org/~keithp/linux: (72 commits)
    drm/i915/dp: Fix eDP on PCH DP on CPT/PPT
    drm/i915/dp: Introduce is_cpu_edp()
    drm/i915: use correct SPD type value
    drm/i915: fix ILK+ infoframe support
    drm/i915: add DP test request handling
    drm/i915: read full receiver capability field during DP hot plug
    drm/i915/dp: Remove eDP special cases from bandwidth checks
    drm/i915/dp: Fix the math in intel_dp_link_required
    drm/i915/panel: Always record the backlight level again (but cleverly)
    i915: Move i915_read/write out of line
    drm/i915: remove transcoder PLL mashing from mode_set per specs
    drm/i915: if transcoder disable fails, say which
    drm/i915: set watermarks for third pipe on IVB
    drm/i915: export a CPT mode set verification function
    drm/i915: fix transcoder PLL select masking
    drm/i915: fix IVB cursor support
    drm/i915: fix debug output for 3 pipe configs
    drm/i915: add PLL sharing support to handle 3 pipes
    drm/i915: fix PCH PLL assertion check for 3 pipes
    drm/i915: use transcoder select bits on VGA and HDMI on CPT
    ...

    Dave Airlie
     

21 Oct, 2011

3 commits

  • DPCD 1.1+ adds some automated test infrastructure support. Add support
    for reading the IRQ source and jumping to a test handling routine if
    needed. Subsequent patches will handle particular tests; this patch
    just ACKs any requested tests by default.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Jesse Barnes
     
  • Add the addresses and definitions I care about for Panel Self Refresh, as
    documented in the eDP spec.

    I'm sending these out before some other patches because this should be a fairly
    simple one to get upstream and not require too much fuss (where the others may
    have some fuss).

    This file is a mess with white spacing. I tried to stay consistent with the
    surrounding code.

    v2: had some silly mistakes in v1 which Keith caught

    Cc: Dave Airlie
    Cc: Keith Packard
    Signed-off-by: Ben Widawsky
    Signed-off-by: Keith Packard

    Ben Widawsky
     
  • Idle the GPU before doing any unmaps. We know if VT-d is in use through
    an exported variable from iommu code.

    This should avoid a known HW issue.

    Signed-off-by: Ben Widawsky
    Reviewed-by: Daniel Vetter
    Signed-off-by: Keith Packard

    Ben Widawsky
     

11 Oct, 2011

1 commit


10 Oct, 2011

1 commit

  • Add a way to send DRM events down the gpu fifo by attaching them to
    fence objects. This may be useful for Xserver swapbuffer throttling and
    page-flip done notifications.

    Bump version to 2.2 to signal the availability of the FENCE_EVENT ioctl.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     

05 Oct, 2011

2 commits

  • This patch is a DRM Driver for Samsung SoC Exynos4210 and now enables
    only FIMD yet but we will add HDMI support also in the future.

    this patch is based on git repository below:
    git://people.freedesktop.org/~airlied/linux.git
    branch name: drm-next
    commit-id: 88ef4e3f4f616462b78a7838eb3ffc3818d30f67

    you can refer to our working repository below:
    http://git.infradead.org/users/kmpark/linux-2.6-samsung
    branch name: samsung-drm

    We tried to re-use lowlevel codes of the FIMD driver(s3c-fb.c
    based on Linux framebuffer) but couldn't so because lowlevel codes
    of s3c-fb.c are included internally and so FIMD module of this driver has
    its own lowlevel codes.

    We used GEM framework for buffer management and DMA APIs(dma_alloc_*)
    for buffer allocation so we can allocate physically continuous memory
    for DMA through it and also we could use CMA later if CMA is applied to
    mainline.

    Refer to this link for CMA(Continuous Memory Allocator):
    http://lkml.org/lkml/2011/7/20/45

    this driver supports only physically continuous memory(non-iommu).

    Links to previous versions of the patchset:
    v1: < https://lwn.net/Articles/454380/ >
    v2: < http://www.spinics.net/lists/kernel/msg1224275.html >
    v3: < http://www.spinics.net/lists/dri-devel/msg13755.html >
    v4: < http://permalink.gmane.org/gmane.comp.video.dri.devel/60439 >
    v5: < http://comments.gmane.org/gmane.comp.video.dri.devel/60802 >

    Changelog v2:
    DRM: add DRM_IOCTL_SAMSUNG_GEM_MMAP ioctl command.

    this feature maps user address space to physical memory region
    once user application requests DRM_IOCTL_SAMSUNG_GEM_MMAP ioctl.

    DRM: code clean and add exception codes.

    Changelog v3:
    DRM: Support multiple irq.

    FIMD and HDMI have their own irq handler but DRM Framework can regiter
    only one irq handler this patch supports mutiple irq for Samsung SoC.

    DRM: Consider modularization.

    each DRM, FIMD could be built as a module.

    DRM: Have indenpendent crtc object.

    crtc isn't specific to SoC Platform so this patch gets a crtc
    to be used as common object.
    created crtc could be attached to any encoder object.

    DRM: code clean and add exception codes.

    Changelog v4:
    DRM: remove is_defult from samsung_fb.

    is_default isn't used for default framebuffer.

    DRM: code refactoring to fimd module.
    this patch is be considered with multiple display objects and
    would use its own request_irq() to register a irq handler instead of
    drm framework's one.

    DRM: remove find_samsung_drm_gem_object()

    DRM: move kernel private data structures and definitions to driver folder.

    samsung_drm.h would contain only public information for userspace
    ioctl interface.

    DRM: code refactoring to gem modules.
    buffer module isn't dependent of gem module anymore.

    DRM: fixed security issue.

    DRM: remove encoder porinter from specific connector.

    samsung connector doesn't need to have generic encoder.

    DRM: code clean and add exception codes.

    Changelog v5:
    DRM: updated fimd(display controller) driver.
    added various pixel formats, color key and pixel blending features.

    DRM: removed end_buf_off from samsung_drm_overlay structure.
    this variable isn't used and end buffer address would be
    calculated by each sub driver.

    DRM: use generic function for mmap_offset.
    replaced samsung_drm_gem_create_mmap_offset() and
    samsung_drm_free_mmap_offset() with generic ones applied
    to mainline recentrly.

    DRM: removed unnecessary codes and added exception codes.

    DRM: added comments and code clean.

    Changelog v6:
    DRM: added default config options.

    DRM: added padding for 64-bit align.

    DRM: changed prefix 'samsung' to 'exynos'

    Signed-off-by: Inki Dae
    Signed-off-by: Joonyoung Shim
    Signed-off-by: Seung-Woo Kim
    Signed-off-by: Kyungmin Park
    Reviewed-by: Konrad Rzeszutek Wilk
    Reviewed-by: Dave Airlie
    Reviewed-by: Rob Clark
    Signed-off-by: Dave Airlie

    Inki Dae
     
  • Signed-off-by: Jakob Bornecrantz
    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Jakob Bornecrantz
     

22 Sep, 2011

1 commit

  • ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
    capabilities of the plugged monitor.

    This adds drm_edid_to_eld() for converting EDID to ELD. The converted
    ELD will be saved in a new drm_connector.eld[128] data field. This is
    necessary because the graphics driver will need to fixup some of the
    data fields (eg. HDMI/DP connection type, AV sync delay) before writing
    to the hardware ELD buffer. drm_av_sync_delay() will help the graphics
    drivers dynamically compute the AV sync delay for fixing-up the ELD.

    ELD selection policy: it's possible for one encoder to be associated
    with multiple connectors (ie. monitors), in which case the first found
    ELD will be returned by drm_select_eld(). This policy may not be
    suitable for all users, but let's start it simple first.

    The impact of ELD selection policy: assume there are two monitors, one
    supports stereo playback and the other has 8-channel output; cloned
    display mode is used, so that the two monitors are associated with the
    same internal encoder. If only the stereo playback capability is reported,
    the user won't be able to start 8-channel playback; if the 8-channel ELD
    is reported, then user space applications may send 8-channel samples
    down, however the user may actually be listening to the 2-channel
    monitor and not connecting speakers to the 8-channel monitor.

    According to James, many TVs will either refuse the display anything or
    pop-up an OSD warning whenever they receive hdmi audio which they cannot
    handle. Eventually we will require configurability and/or per-monitor
    audio control even when the video is cloned.

    CC: Zhao Yakui
    CC: Wang Zhenyu
    CC: Jeremy Bush
    CC: Christopher White
    CC: Pierre-Louis Bossart
    CC: Paul Menzel
    CC: James Cloos
    CC: Chris Wilson
    Signed-off-by: Ben Skeggs
    Signed-off-by: Wu Fengguang
    Signed-off-by: Keith Packard

    Wu Fengguang
     

06 Sep, 2011

7 commits

  • This bumps driver major version as a result of previous incompatible
    interface changes.

    In addition, a leftover command definition is removed from the
    vmwgfx_drm.h header.

    Also a strict version check is enforced on the exebuf ioctl.

    This is intended to be the last major bump before exiting staging.

    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • Will be needed for queries and drm event-driven throttling.

    As a benefit, they help avoid stale user-space fence handles.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • This is needed before we introduce the fence objects.
    Otherwise this will be even more confusing. The plan is to use the following:

    seqno: A 32-bit sequence number that may be passed in the fifo.
    marker: Objects, carrying a seqno, that track fifo submission time. They
    are used for fifo lag based throttling.
    fence objects: Kernel space objects, possibly accessible from user-space and
    carrying a 32-bit seqno together with signaled status.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • Since we don't allow user-space to map the fifo anymore,
    add a parameter to get fifo hw version and
    an ioctl to copy the 3D capabilities.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecranz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • This was previously used by user-space to check whether a fence
    sequence had passed or not.
    With fence objects that's not needed anymore.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • It doesn't seem like its needed. If this turns out to be an incorrect
    assumption, we can reinstate it.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • It was only used for bringup debugging, and probably doesn't work
    anymore. Remove it.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     

01 Sep, 2011

2 commits

  • The new DRM_RADEON_GEM_WAIT ioctl combines GEM_WAIT_IDLE and GEM_BUSY (there
    is a NO_WAIT flag to get the latter) with USAGE_READ and USAGE_WRITE flags
    to take advantage of the new ttm_bo_wait changes.

    Also bump the DRM version.

    Signed-off-by: Marek Olšák
    Reviewed-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Marek Olšák
     
  • Sometimes we want to know whether a buffer is busy and wait for it (bo_wait).
    However, sometimes it would be more useful to be able to query whether
    a buffer is busy and being either read or written, and wait until it's stopped
    being either read or written. The point of this is to be able to avoid
    unnecessary waiting, e.g. if a GPU has written something to a buffer and is now
    reading that buffer, and a CPU wants to map that buffer for read, it needs to
    only wait for the last write. If there were no write, there wouldn't be any
    waiting needed.

    This, or course, requires user space drivers to send read/write flags
    with each relocation (like we have read/write domains in radeon, so we can
    actually use those for something useful now).

    Now how this patch works:

    The read/write flags should passed to ttm_validate_buffer. TTM maintains
    separate sync objects of the last read and write for each buffer, in addition
    to the sync object of the last use of a buffer. ttm_bo_wait then operates
    with one the sync objects.

    Signed-off-by: Marek Olšák
    Reviewed-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Marek Olšák
     

30 Aug, 2011

1 commit


04 Aug, 2011

3 commits

  • Provides function drm_edid_header_is_valid() for EDID header check
    and replaces EDID header check part of function drm_edid_block_valid()
    by a call of drm_edid_header_is_valid().
    This is a prerequisite to extend DDC probing, e. g. in function
    radeon_ddc_probe() for Radeon devices, by a central EDID header check.

    Tested for kernel 2.6.35, 2.6.38 and 3.0

    Cc:
    Signed-off-by: Thomas Reim
    Reviewed-by: Alex Deucher
    Acked-by: Stephen Michaels
    Signed-off-by: Dave Airlie

    Thomas Reim
     
  • …t/keithp/linux-2.6 into drm-fixes

    * 'drm-intel-next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: (42 commits)
    drm/i915: allow cache sharing policy control
    drm/i915/hdmi: HDMI source product description infoframe support
    drm/i915/hdmi: split infoframe setting from infoframe type code
    drm: track CEA version number if present
    drm/i915: Try enabling RC6 by default (again)
    Revert "drm/i915/dp: Zero the DPCD data before connection probe"
    drm/i915/dp: wait for previous AUX channel activity to clear
    drm/i915: don't use uninitialized EDID bpc values when picking pipe bpp
    drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend
    drm/i915: apply phase pointer override on SNB+ too
    drm/i915: Add quirk to disable SSC on Sony Vaio Y2
    drm/i915: provide more error output when mode sets fail
    drm/i915: add GPU max frequency control file
    i915: add Dell OptiPlex FX170 to intel_no_lvds
    drm/i915: Ignore GPU wedged errors while pinning scanout buffers
    drm/i915/hdmi: send AVI info frames on ILK+ as well
    drm/i915: fix CB tuning check for ILK+
    drm/i915: Flush other plane register writes
    drm/i915: flush plane control changes on ILK+ as well
    drm/i915: apply timing generator bug workaround on CPT and PPT
    ...

    Dave Airlie
     
  • Drivers need to know the CEA version number in addition to other display
    info (like whether the display is an HDMI sink) before enabling certain
    features. So track the CEA version number in the display info
    structure.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Jesse Barnes