1. 12 9月, 2014 1 次提交
    • J
      drm: use c99 initializers in structures · d456ea2e
      Julia Lawall 提交于
      Use c99 initializers for structures.
      
      Drop 0 initializers in drivers/gpu/drm/sti/sti_vtac.c.  A 0x0 initializer
      is left in vtac_mode_aux in drivers/gpu/drm/sti/sti_vtac.c to highlight the
      relation to vtac_mode_main.
      
      A simplified version of the semantic match that finds the first problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @decl@
      identifier i1,fld;
      type T;
      field list[n] fs;
      @@
      
      struct i1 {
       fs
       T fld;
       ...};
      
      @bad@
      identifier decl.i1,i2;
      expression e;
      initializer list[decl.n] is;
      @@
      
      struct i1 i2 = { is,
      + .fld = e
      - e
       ,...};
      // </smpl>
      
      v2: Drop 0 initializers and add trailing commas at the suggestions of Josh
      Triplett.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d456ea2e
  2. 15 8月, 2014 1 次提交
    • D
      drm: Docbook fixes · 295ee853
      Daniel Vetter 提交于
      Bunch of small leftovers spotted by looking at the make htmldocs output.
      
      I've left out dp mst, there's too much amiss there.
      
      v2: Also add the missing parameter docbook in the dp mst code - Dave
      Airlie correctly pointed out that we don't actually want kerneldoc for
      the missing structure members in header files.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      295ee853
  3. 23 7月, 2014 1 次提交
  4. 18 7月, 2014 1 次提交
  5. 10 6月, 2014 1 次提交
  6. 04 6月, 2014 2 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
    • J
      drm: replace drm_get_connector_name() with direct name field use · 25933820
      Jani Nikula 提交于
      Generated using semantic patch:
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(E)
      + E->name
      
      [airlied: regenerated]
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      25933820
  7. 03 6月, 2014 2 次提交
  8. 27 5月, 2014 1 次提交
  9. 29 4月, 2014 2 次提交
  10. 22 4月, 2014 1 次提交
    • V
      drm/edid: Fill PAR in AVI infoframe based on CEA mode list · 0967e6a5
      Vandana Kannan 提交于
      Populate PAR in infoframe structure. If there is a user setting for PAR, then
      that value is set. Else, value is taken from CEA mode list if VIC is found.
      Else, PAR is calculated from resolution. If none of these conditions are
      satisfied, PAR is NONE as per initialization.
      
      v2: Removed the part which sets PAR according to user input, based on
      Daniel's review comments.
      
      A separate patch will be submitted to create a property that would enable a
      user space app to set aspect ratio for AVI infoframe.
      
      v2: Removed the part which sets PAR according to user input, based on
      Daniel's review comments.
      
      v3: Removed calculation of PAR for non-CEA modes as per discussion with
      Ville.
      
      A separate patch will be submitted to create a property that would enable a
      user space app to set aspect ratio for AVI infoframe.
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Jesse Barnes <jesse.barnes@intel.com>
      Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Squash in fixup for htmldocs.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0967e6a5
  11. 17 3月, 2014 1 次提交
  12. 13 3月, 2014 2 次提交
  13. 04 3月, 2014 1 次提交
  14. 21 1月, 2014 3 次提交
  15. 17 12月, 2013 1 次提交
  16. 05 12月, 2013 2 次提交
  17. 12 11月, 2013 1 次提交
  18. 06 11月, 2013 4 次提交
  19. 17 10月, 2013 1 次提交
  20. 10 10月, 2013 1 次提交
  21. 01 10月, 2013 8 次提交
  22. 31 8月, 2013 2 次提交
    • A
      drm/edid: add a helper function to extract the speaker allocation data block (v3) · d105f476
      Alex Deucher 提交于
      This adds a helper function to extract the speaker allocation
      data block from the EDID.  This data block describes what speakers
      are present on the display device.
      
      v2: update per Ville Syrjälä's comments
      v3: fix copy/paste typo in memory allocation
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NRafał Miłecki <zajec5@gmail.com>
      d105f476
    • A
      drm/edid: add quirk for Medion MD30217PG · 118bdbd8
      Alex Deucher 提交于
      This LCD monitor (1280x1024 native) has a completely
      bogus detailed timing (640x350@70hz).  User reports that
      1280x1024@60 has waves so prefer 1280x1024@75.
      
      Manufacturer: MED  Model: 7b8  Serial#: 99188
      Year: 2005  Week: 5
      EDID Version: 1.3
      Analog Display Input,  Input Voltage Level: 0.700/0.700 V
      Sync:  Separate
      Max Image Size [cm]: horiz.: 34  vert.: 27
      Gamma: 2.50
      DPMS capabilities: Off; RGB/Color Display
      First detailed timing is preferred mode
      redX: 0.645 redY: 0.348   greenX: 0.280 greenY: 0.605
      blueX: 0.142 blueY: 0.071   whiteX: 0.313 whiteY: 0.329
      Supported established timings:
      720x400@70Hz
      640x480@60Hz
      640x480@72Hz
      640x480@75Hz
      800x600@56Hz
      800x600@60Hz
      800x600@72Hz
      800x600@75Hz
      1024x768@60Hz
      1024x768@70Hz
      1024x768@75Hz
      1280x1024@75Hz
      Manufacturer's mask: 0
      Supported standard timings:
      Supported detailed timing:
      clock: 25.2 MHz   Image Size:  337 x 270 mm
      h_active: 640  h_sync: 688  h_sync_end 784 h_blank_end 800 h_border: 0
      v_active: 350  v_sync: 350  v_sync_end 352 v_blanking: 449 v_border: 0
      Monitor name: MD30217PG
      Ranges: V min: 56 V max: 76 Hz, H min: 30 H max: 83 kHz, PixClock max 145 MHz
      Serial No: 501099188
      EDID (in hex):
                00ffffffffffff0034a4b80774830100
                050f010368221b962a0c55a559479b24
                125054afcf00310a0101010101018180
                000000000000d60980a0205e63103060
                0200510e1100001e000000fc004d4433
                3032313750470a202020000000fd0038
                4c1e530e000a202020202020000000ff
                003530313039393138380a2020200078
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reported-by: friedrich@mailstation.de
      Cc: stable@vger.kernel.org
      118bdbd8