13 Jan, 2012

1 commit

  • There exists at least one NVIDIA GPU (Quadro NVS 300) that has a DMS-59
    connector which is capable of supporting DisplayPort, TMDS and VGA on
    a single connector.

    We need to bump the allowed encoder limit to support all three configs.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     

05 Jan, 2012

1 commit

  • In cases where the scanout hw is sufficiently similar between "overlay"
    and traditional crtc layers, it might be convenient to allow the driver
    to create internal drm_plane helper objects used by the drm_crtc
    implementation, rather than duplicate code between the plane and crtc.
    A private plane is not exposed to userspace.

    Signed-off-by: Rob Clark
    Signed-off-by: Dave Airlie

    Rob Clark
     

20 Dec, 2011

2 commits


06 Dec, 2011

9 commits


30 Nov, 2011

1 commit


16 Nov, 2011

2 commits

  • To properly support the various plane formats supported by different
    hardware, the kernel must know the pixel format of a framebuffer object.
    So add a new ioctl taking a format argument corresponding to a fourcc
    name from the new drm_fourcc.h header file. Implement the fb creation
    hooks in terms of the new mode_fb_cmd2 using helpers where the old
    bpp/depth values are needed.

    v2: create DRM specific fourcc header file for sharing with libdrm etc
    v3: fix rebase failure and use DRM fourcc codes in intel_display.c and
    update commit message
    v4: make fb_cmd2 handle field into an array for multi-object formats
    pull in Ville's fix for the memcpy in drm_plane_init
    apply Ville's cleanup to zero out fb_cmd2 arg in drm_mode_addfb
    v5: add 'flags' field for interlaced support (from Ville)

    Signed-off-by: Ville Syrjälä
    Acked-by: Alan Cox
    Reviewed-by: Rob Clark
    Signed-off-by: Jesse Barnes
    Signed-off-by: Dave Airlie

    Jesse Barnes
     
  • Planes are a bit like half-CRTCs. They have a location and fb, but
    don't drive outputs directly. Add support for handling them to the core
    KMS code.

    v2: fix ABI of get_plane - move format_type_ptr to the end
    v3: add 'flags' field for interlaced support (from Ville)

    Acked-by: Alan Cox
    Reviewed-by: Rob Clark
    Reviewed-by: Daniel Vetter
    Signed-off-by: Jesse Barnes
    Signed-off-by: Dave Airlie

    Jesse Barnes
     

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
     

04 Aug, 2011

2 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
     
  • 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
     

16 Jun, 2011

1 commit

  • Some RS690 chipsets seem to end up with floating connectors, either
    a DVI connector isn't actually populated, or an add-in HDMI card
    is available but not installed. In this case we seem to get a NULL byte
    response for each byte of the i2c transaction, so we detect this
    case and if we see it we don't do anymore DDC transactions on this
    connector.

    I've tested this on my RS690 without the HDMI card installed and
    it seems to work fine.

    Signed-off-by: Dave Airlie
    Reviewed-by: Alex Deucher

    Dave Airlie
     

28 Apr, 2011

2 commits

  • EDID 1.4 digital displays report the color spaces they support in the
    features block. Add support for grabbing this data and stuffing it into
    the display_info struct for driver use.

    Signed-off-by: Jesse Barnes
    Reviewed-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Jesse Barnes
     
  • EDID 1.4 digital monitors report the bit depth supported in the input
    field. Add support for parsing this out and storing the info in the
    display_info structure for use by drivers.

    [airlied: tweaked to fix inter-patch dependency]
    Signed-off-by: Jesse Barnes
    Reviewed-by: Adam Jackson
    Signed-off-by: Dave Airlie

    Jesse Barnes
     

08 Apr, 2011

1 commit


01 Apr, 2011

1 commit


31 Mar, 2011

1 commit


23 Feb, 2011

1 commit


07 Feb, 2011

1 commit

  • This is just an idea that might or might not be a good idea,
    it basically adds two ioctls to create a dumb and map a dumb buffer
    suitable for scanout. The handle can be passed to the KMS ioctls to create
    a framebuffer.

    It looks to me like it would be useful in the following cases:
    a) in development drivers - we can always provide a shadowfb fallback.
    b) libkms users - we can clean up libkms a lot and avoid linking
    to libdrm_*.
    c) plymouth via libkms is a lot easier.

    Userspace bits would be just calls + mmaps. We could probably
    mark these handles somehow as not being suitable for acceleartion
    so as top stop people who are dumber than dumb.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

26 Jan, 2011

1 commit

  • Iterate over the attached CRTCs, encoders and connectors and call the
    supplied reset vfunc in order to reset any cached state back to unknown.
    Useful after an invalidation event such as a GPU reset or resuming.

    Tested-by: Takashi Iwai
    Signed-off-by: Chris Wilson

    Chris Wilson
     

22 Nov, 2010

1 commit

  • The DRI2 swap & sync implementation needs precise
    vblank counts and precise timestamps corresponding
    to those vblank counts. For conformance to the OpenML
    OML_sync_control extension specification the DRM
    timestamp associated with a vblank count should
    correspond to the start of video scanout of the first
    scanline of the video frame following the vblank
    interval for that vblank count.

    Therefore we need to carry around precise timestamps
    for vblanks. Currently the DRM and KMS drivers generate
    timestamps ad-hoc via do_gettimeofday() in some
    places. The resulting timestamps are sometimes not
    very precise due to interrupt handling delays, they
    don't conform to OML_sync_control and some are wrong,
    as they aren't taken synchronized to the vblank.

    This patch implements support inside the drm core
    for precise and robust timestamping. It consists
    of the following interrelated pieces.

    1. Vblank timestamp caching:

    A per-crtc ringbuffer stores the most recent vblank
    timestamps corresponding to vblank counts.

    The ringbuffer can be read out lock-free via the
    accessor function:

    struct timeval timestamp;
    vblankcount = drm_vblank_count_and_time(dev, crtcid, ×tamp).

    The function returns the current vblank count and
    the corresponding timestamp for start of video
    scanout following the vblank interval. It can be
    used anywhere between enclosing drm_vblank_get(dev, crtcid)
    and drm_vblank_put(dev,crtcid) statements. It is used
    inside the drmWaitVblank ioctl and in the vblank event
    queueing and handling. It should be used by kms drivers for
    timestamping of bufferswap completion.

    The timestamp ringbuffer is reinitialized each time
    vblank irq's get reenabled in drm_vblank_get()/
    drm_update_vblank_count(). It is invalidated when
    vblank irq's get disabled.

    The ringbuffer is updated inside drm_handle_vblank()
    at each vblank irq.

    2. Calculation of precise vblank timestamps:

    drm_get_last_vbltimestamp() is used to compute the
    timestamp for the end of the most recent vblank (if
    inside active scanout), or the expected end of the
    current vblank interval (if called inside a vblank
    interval). The function calls into a new optional kms
    driver entry point dev->driver->get_vblank_timestamp()
    which is supposed to provide the precise timestamp.
    If a kms driver doesn't implement the entry point or
    if the call fails, a simple do_gettimeofday() timestamp
    is returned as crude approximation of the true vblank time.

    A new drm module parameter drm.timestamp_precision_usec
    allows to disable high precision timestamps (if set to
    zero) or to specify the maximum acceptable error in
    the timestamps in microseconds.

    Kms drivers could implement their get_vblank_timestamp()
    function in a gpu specific way, as long as returned
    timestamps conform to OML_sync_control, e.g., by use
    of gpu specific hardware timestamps.

    Optionally, kms drivers can simply wrap and use the new
    utility function drm_calc_vbltimestamp_from_scanoutpos().
    This function calls a new optional kms driver function
    dev->driver->get_scanout_position() which returns the
    current horizontal and vertical video scanout position
    of the crtc. The scanout position together with the
    drm_display_timing of the current video mode is used
    to calculate elapsed time relative to start of active scanout
    for the current video frame. This elapsed time is subtracted
    from the current do_gettimeofday() time to get the timestamp
    corresponding to start of video scanout. Currently
    non-interlaced, non-doublescan video modes, with or
    without panel scaling are handled correctly. Interlaced/
    doublescan modes are tbd in a future patch.

    3. Filtering of redundant vblank irq's and removal of
    some race-conditions in the vblank irq enable/disable path:

    Some gpu's (e.g., Radeon R500/R600) send spurious vblank
    irq's outside the vblank if vblank irq's get reenabled.
    These get detected by use of the vblank timestamps and
    filtered out to avoid miscounting of vblanks.

    Some race-conditions between the vblank irq enable/disable
    functions, the vblank irq handler and the gpu itself (updating
    its hardware vblank counter in the "wrong" moment) are
    fixed inside vblank_disable_and_save() and
    drm_update_vblank_count() by use of the vblank timestamps and
    a new spinlock dev->vblank_time_lock.

    The time until vblank irq disable is now configurable via
    a new drm module parameter drm.vblankoffdelay to allow
    experimentation with timeouts that are much shorter than
    the current 5 seconds and should allow longer vblank off
    periods for better power savings.

    Followup patches will use these new functions to
    implement precise timestamping for the intel and radeon
    kms drivers.

    Signed-off-by: Mario Kleiner
    Signed-off-by: Dave Airlie

    Mario Kleiner
     

19 Oct, 2010

1 commit


06 Oct, 2010

1 commit


14 Sep, 2010

1 commit


13 Sep, 2010

1 commit

  • Destructive load-detection is very expensive and due to failings
    elsewhere can trigger system wide stalls of up to 600ms. A simple
    first step to correcting this is not to invoke such an expensive
    and destructive load-detection operation automatically.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29536
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16265
    Reported-by: Bruno Prémont
    Tested-by: Sitsofe Wheeler
    Signed-off-by: Chris Wilson
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     

13 Aug, 2010

1 commit

  • * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
    io-mapping: move asm include inside the config option
    vgaarb: drop vga.h include
    drm/radeon: Add probing of clocks from device-tree
    drm/radeon: drop old and broken mesa warning
    drm/radeon: Fix pci_map_page() error checking
    drm: Remove count_lock for calling lastclose() after 58474713 (v2)
    drm/radeon/kms: allow FG_ALPHA_VALUE on r5xx
    drm/radeon/kms: another r6xx/r7xx CS checker fix
    DRM: Replace kmalloc/memset combos with kzalloc
    drm: expand gamma_set
    drm/edid: Split mode lists out to their own header for readability
    drm/edid: Rewrite mode parse to use the generic detailed block walk
    drm/edid: Add detailed block walk for VTB extensions
    drm/edid: Add detailed block walk for CEA extensions
    drm: Remove unused fields from drm_display_info
    drm: Use ENOENT consistently for the error return for an unmatched handle.
    drm/radeon/kms: mark 3D power states as performance
    drm: Only set DPMS once on the CRTC not after every encoder.
    drm/radeon/kms: add additional quirk for Acer rv620 laptop
    drm: Propagate error code from fb_create()
    ...

    Fix up trivial conflicts in drivers/gpu/drm/drm_edid.c

    Linus Torvalds
     

10 Aug, 2010

2 commits


23 Jul, 2010

1 commit

  • Workqueue can now handle high concurrency. Convert drm_crtc_helper to
    use system_nrt_wq instead of slow-work. The conversion is mostly
    straight forward. One difference is that drm_helper_hpd_irq_event()
    no longer blocks and can be called from any context.

    Signed-off-by: Tejun Heo
    Acked-by: David Airlie
    Cc: dri-devel@lists.freedesktop.org

    Tejun Heo
     

18 May, 2010

2 commits

  • Simple cloning rules compared to server:
    (a) single crtc
    (b) > 1 connector active
    (c) check command line mode
    (d) try and find 1024x768 DMT mode if no command line.
    (e) fail to clone

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • After thinking it over a lot it made more sense for the core to deal with
    the output polling especially so it can notify X.

    v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings.

    v3: add config lock take inside polling, add intel/nouveau poll init/fini calls

    v4: config lock was a bit agressive, only needed around connector list reading.
    otherwise it could re-enter.

    glisse: discard drm_helper_hpd_irq_event

    v3: Reviewed-by: Michel Dänzer
    Signed-off-by: Dave Airlie

    Dave Airlie
     

20 Apr, 2010

1 commit

  • * drm-fbdev-cleanup:
    drm/fb: remove drm_fb_helper_setcolreg
    drm/kms/fb: use slow work mechanism for normal hotplug also.
    drm/kms/fb: add polling support for when nothing is connected.
    drm/kms/fb: provide a 1024x768 fbcon if no outputs found.
    drm/kms/fb: separate fbdev connector list from core drm connectors
    drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list
    drm/fb: fix fbdev object model + cleanup properly.

    Conflicts:
    drivers/gpu/drm/i915/i915_drv.h
    drivers/gpu/drm/nouveau/nouveau_drv.h

    Dave Airlie