10 May, 2013

2 commits


16 Apr, 2013

1 commit

  • …m-intel into drm-next

    Daniel writes:
    Since I expect Linus to open the merge window in about a week I guess this
    is the last i915 feature pull for 3.10. Highlights:
    Updated testing tree for -next. Highlights:
    - Corner case fixes discovered with static analyzers (Damien).
    - More fixes to combat unclaimed register errors on Haswell (Paulo).
    - Some small fixes to the gpu turbo code (Rodrigo+Ben), Ben has more
    fixes for overclocking support pending.
    - More prep work for fastboot from Chris.
    - VT-switchless suspend/resume from Jesse.
    - The prep work of Egbert Eich's hpd irq storm handling. Hopefully we can
    squeeze in the actual storm handling code for 3.10 ...
    - More convenience helpers for Imre's sg iterator. Core parts acked by
    Andrew Morton.
    - A bit of backlight code cleanup from Jani.
    - Fixed ilk gpu reset (Jesse).
    - Reduced color range handling fixes for VLV (Ville).

    The big item here is though the introduction of pipe_config to properly
    pre-compute the desired modeset state before touching the hw. Together
    with some very basic support to read out the current config from the hw
    and compare the state with the sw tracking. This is all prep work for more
    reliable fastboot, atomic modesets and other cool features. Stuff
    converted to the new world includes:
    - Most simple pipe attributes (reduce color range, pixel multiplier).
    - Pipe bpp/dither handling.
    - Some convenience flags like ->has_pch_encoder to simplify the code flow.
    - (Almost) DP clock handling, had to be reverted since part of a prep
    patch was lost in rebasing ...
    Expect a lot of patches for this throughout 3.11, there's tons of work
    till we have all state properly tracked for fastbooting to woExpect a lot
    of patches for this throughout 3.11, there's tons of work till we have all
    state properly tracked for fastbooting to work.

    For 3.10 I have a bunch of fixes queued up and I plan to send them all out
    at the end of this week. I need to shuffle patches in my -next queue a bit
    so that we don't but feature-y stuff in there, too. The main thing I'd
    like to sneak in is Egbert's hpd irq storm handling, which should be
    pretty low-risk since all the infrastructure work has landed already. I
    also have the oops fix pending, but that only mustered review before the
    w/e and giving how hairy that part of our modeset code is, I want to give
    it some more testing before forwarding.

    Note: annarchy.fd.o seems to run out of disk space, so couldn't push the
    usual for-airlied branch. Tag should work though.

    Note 2: I've had to do a backmerge since conflicts grew too ugly, but the
    upstream -rc I've backmerged is already in your drm-next.

    * tag 'drm-intel-next-2013-04-06' of git://people.freedesktop.org/~danvet/drm-intel: (75 commits)
    drm/i915: info level for simulated gpu hang dmesg notice
    drm/i915: revert eDP bpp clamping code changes
    Revert "drm/i915: fix DP get_hw_state return value"
    drm/i915: Don't use the HDMI port color range bit on Valleyview
    drm/i915: Set PIPECONF color range bit on Valleyview
    drm/i915: extract i9xx_set_pipeconf
    drm/i915: Add no-lvds quirk for Fujitsu Esprimo Q900
    drm/i915: create pipe_config->dpll for clock state
    drm/i915: hw readout support for ->has_pch_encoders
    drm/i915: add hw state readout/checking for pipe_config
    drm/i915: rip out superflous is_dp&is_cpu_edp tracking
    drm/i915: remove leaky eDP functions
    drm/i915: track dp target_clock in pipe_config
    drm/i915: move dp_m_n computation to dp_encoder->compute_config
    drm/i915: clear up the fdi/dp set_m_n confusion
    drm/i915: Fix sdvo connector get_hw_state function
    drm/i915: drop DPFLIPSTAT enables on VLV v3
    drm/i915: add Punit read/write routines for VLV v2
    drm/i915: panel power sequencing for VLV eDP v2
    drm/i915/dp: fix up VLV DP handling v2
    ...

    Dave Airlie
     

12 Apr, 2013

1 commit


27 Mar, 2013

1 commit

  • Rather than building a config which may or may not work, let the driver
    build an initial fb config. This allows the driver to use the BIOS boot
    configuration for example, displaying kernel messages and the initial fb
    console on the same outputs the BIOS lit up at boot time. If that
    fails, the driver can still fall back the same way as the core.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Chris Wilson
    Cc: dri-devel@lists.freedesktop.org
    Acked-by: Dave Airlie
    Reviewed-by: Imre Deak
    Signed-off-by: Daniel Vetter

    Jesse Barnes
     

14 Feb, 2013

4 commits

  • Spotted by Rob Clark.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Now that the fbdev helper interface for drivers is trimmed down,
    update the kerneldoc for all the remaining exported functions.

    I've tried to beat the DocBook a bit by reordering the function
    references a bit into a more sensible ordering. But that didn't work
    out at all. Hence just extend the in-code DOC: section a bit.

    Also remove the LOCKING: sections - especially for the setup functions
    they're totally bogus. But that's not a documentation problem, but
    simply an artifact of the current rather hazardous locking around drm
    init and even more so around fbdev setup ...

    v2: Some further improvements:
    - Also add documentation for drm_fb_helper_single_add_all_connectors,
    Dave Airlie didn't want me to kill this one from the fb helper
    interface.
    - Update docs for drm_fb_helper_fill_var/fix - they should be used
    from the driver's ->fb_probe callback to setup the fbdev info
    structure.
    - Clarify what the ->fb_probe callback should all do - it needs to
    setup both the fbdev info and allocate the drm framebuffer used as
    backing storage.
    - Add basic documentaation for the drm_fb_helper_funcs driver callback
    vfunc.

    v3: Implement clarifications Laurent Pinchart suggested in his review.

    v4: Fix another mispelling Laurent spotted.

    Cc: Laurent Pinchart
    Acked-by: Laurent Pinchart
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • Not called by anyone, and really, shouldn't be. Drivers are supposed
    either drm_fb_helper_initial_config or drm_fb_helper_hotplug_event.
    Originally this was done differently, but is now consolidated in the
    helper functions and no longer done by drivers directly.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • It's only used internally for the sysrq and panic handlers provided by
    the drm fb helper implementation. Hence just inline it, kill the
    export and remove the confusing kerneldoc. Driver's are supposed to
    call drm_fb_helper_restore_fbdev_mode on lastclose.

    Note that locking is totally fubar - the sysrq case doesn't take any
    locks at all. The panic handler probably shouldn't take any locks
    since it'll only make things worse. Otoh it's probably better to
    switch things over to the atomic modeset callbacks (and disable the
    panic handler for those drivers which don't implement it).

    But that's both better done in separate patches.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

03 Feb, 2012

2 commits


28 Apr, 2011

2 commits

  • In the absence of configuration data for providing the fixed mode for
    a panel, I would like to be able to pass such modes along a separate
    module paramenter. To do so, I then need to parse a modeline from a
    string, which drm is already capable of. Export that capability to the
    drivers.

    Signed-off-by: Chris Wilson
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • We need to hold the dev->mode_config.mutex whilst detecting the output
    status. But we also need to drop it for the call into
    drm_fb_helper_single_fb_probe(), which indirectly acquires the lock when
    attaching the fbcon.

    Failure to do so exposes a race with normal output probing. Detected by
    adding some warnings that the mutex is held to the backend detect routines:

    [ 17.772456] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]()
    [ 17.772458] Hardware name: Latitude E6400
    [ 17.772460] Modules linked in: ....
    [ 17.772582] Pid: 11, comm: kworker/0:1 Tainted: G W 2.6.38.4-custom.2 #8
    [ 17.772584] Call Trace:
    [ 17.772591] [] ? warn_slowpath_common+0x78/0x8c
    [ 17.772603] [] ? intel_crt_detect+0x3e/0x373 [i915]
    [ 17.772612] [] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
    [ 17.772619] [] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
    [ 17.772625] [] ? drm_fb_helper_hotplug_event+0xa5/0xc3 [drm_kms_helper]
    [ 17.772633] [] ? output_poll_execute+0x146/0x17c [drm_kms_helper]
    [ 17.772638] [] ? cfq_init_queue+0x247/0x345
    [ 17.772644] [] ? output_poll_execute+0x0/0x17c [drm_kms_helper]
    [ 17.772648] [] ? process_one_work+0x193/0x28e
    [ 17.772652] [] ? worker_thread+0xef/0x172
    [ 17.772655] [] ? worker_thread+0x0/0x172
    [ 17.772658] [] ? worker_thread+0x0/0x172
    [ 17.772663] [] ? kthread+0x7a/0x82
    [ 17.772668] [] ? kernel_thread_helper+0x4/0x10
    [ 17.772671] [] ? kthread+0x0/0x82
    [ 17.772674] [] ? kernel_thread_helper+0x0/0x10

    Reported-by: Frederik Himpe
    References: https://bugs.freedesktop.org/show_bug.cgi?id=36394
    Signed-off-by: Chris Wilson
    Signed-off-by: Dave Airlie

    Chris Wilson
     

27 Apr, 2011

1 commit

  • i915 calls the panic handler function on last close to reset the modes,
    however this is a really bad idea for multi-gpu machines, esp shareable
    gpus machines. So add a new entry point for the driver to just restore
    its own fbcon mode.

    v2: move code into fb helper, fix panic code to block mode change on
    powered off GPUs.

    [airlied: this hits drm core and I wrote it and it was reviewed on intel-gfx
    so really I signed it off twice ;-).]
    Signed-off-by: Chris Wilson
    Signed-off-by: Dave Airlie

    Dave Airlie
     

15 Jan, 2011

1 commit

  • This reverts commit dfe63bb0ad9810db13aab0058caba97866e0a681.

    This commit was causing nouveau not to work properly, for -rc1 I'd
    prefer it worked and we can look if this is useful for 2.6.39.

    Cc: James Simmons
    Signed-off-by: Dave Airlie
    Signed-off-by: Linus Torvalds

    Dave Airlie
     

07 Jan, 2011

1 commit

  • If you change the color depth via fbset or some other framebuffer aware
    userland application struct fb_fix_screeninfo is not updated to this new
    information. This patch fixes this issue. Also the function is changed to
    just pass in struct drm_framebuffer so in the future we could use more
    fields. I'm hoping some day fix->smem* could be set here :-)

    Signed-off-by: James Simmons
    Signed-off-by: Dave Airlie

    James Simmons
     

05 Aug, 2010

1 commit


18 May, 2010

1 commit

  • 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
     

07 Apr, 2010

5 commits

  • a) slow work is always used now for any fbcon hotplug, as its not
    a fast task and is more suited to being ran under slow work.

    b) attempt to not do any fbdev changes when X is running as we'll
    just mess it up. This hooks set_par to hopefully do the changes
    once X hands control to fbdev.

    This also adds the nouveau/intel hotplug support.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • When we are running in a headless environment we have no idea what
    output the user might plug in later, we only have hotplug detect
    from the digital outputs. So if we detect no connected outputs at
    initialisation, start a slow work operation to poll every 5 seconds
    for an output.

    this is only hooked up for radeon so far, on hw where we have full
    hotplug detection there is no need for this.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • This breaks the connection between the core drm connector list
    and the fbdev connector usage, and allows them to become disjoint
    in the future. It also removes the untype void* that was in the
    connector struct to support this.

    All connectors are added to the fbdev now but this could be
    changed in the future.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • This move to using the list of crtcs in the fb helper and cleans up the
    whole picking code, now we store the crtc/connectors we want directly
    into the modeset and we use the modeset directly to set the mode.

    Fixes from James Simmons and Ben Skeggs.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work.

    This patch

    a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs.
    b) migrated all the fb helper functions out of the crtc helper file into the fb helper file.
    c) pushed the fb probing/hotplug control into the driver
    d) makes the surface sizes into a structure for ease of passing
    This changes the intel/radeon/nouveau drivers to use the new helper.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

06 Oct, 2009

1 commit

  • The previous patches had some unwanted side effects, I've fixed
    the lack of 32bpp working, and fixed up 16bpp so it should also work.

    this also adds the interface to allow the driver to set a preferred
    console depth so for example low memory rn50 can set it to 8bpp.
    It also catches 24bpp on cards that can't do it and forces 32bpp.

    Tested on r100/r600/i945.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

05 Oct, 2009

1 commit


25 Sep, 2009

1 commit

  • [note this requires an fb patch posted to linux-fbdev-devel already]

    This uses the normal video= command line option to control the kms
    output setup at boot time. It is used to override the autodetection
    done by kms.

    video= normally takes a framebuffer as the first parameter, in kms
    it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output
    connector is specified the mode string will apply to all connectors.

    The mode specification used will match down the probed modes, and if
    no mode is found it will add a CVT mode that matches.

    video=1024x768 - all connectors match a 1024x768 mode or add a CVT on
    video=VGA-1:1024x768, VGA-1 connector gets mode only.

    The same strings as used in current fb modedb.c are used, except I've
    added three more letters, e, D, d, e = enable, D = enable Digital,
    d = disable, which allow a connector to be forced into a certain state.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

31 Aug, 2009

1 commit

  • Initially I always meant this code to be shared, but things
    ran away from me before I got to it.

    This refactors the i915 and radeon kms fbdev interaction layers
    out into generic helpers + driver specific pieces.

    It moves all the panic/sysrq enhancements to the core file,
    and stores a linked list of kernel fbs. This could possibly be
    improved to only store the fb which has fbcon on it for panics
    etc.

    radeon retains some specific codes used for a big endian
    workaround.

    changes:
    fix oops in v1
    fix freeing path for crtc_info

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

    Dave Airlie