Hi Dave,
Decided to send a pull request for my misc drm branch because of teh
memset patch from Thierry for drm_*_cleanup functions (fixes drivers using
deferred probe) and the patch from Takashi. Everything else fairly
trivial.
Cheers, Daniel
The following changes since commit e5b5341c28c66a122982d3d8822a4f9a0938f923:
drm/atomic: clear plane's CRTC and FB when shutting down (2014-11-27 15:39:11 +0100)
are available in the git repository at:
git://anongit.freedesktop.org/drm-intel…
[View More]tags/topic/core-stuff-2014-12-10
for you to fetch changes up to a18c0af171bfb875012da26f23df051004726973:
drm: Zero out DRM object memory upon cleanup (2014-12-10 12:05:56 +0100)
----------------------------------------------------------------
Martin Peres (2):
drm: fix a word repetition in a comment
drm: fix a typo in a comment
Sean Paul (1):
drm/Documentation: Fix rowspan value in drm-kms-properties
Stefan Brüns (3):
drm/edid: move drm_edid_is_zero to top, make edid argument const
drm/edid: shorten log output in case of all zeroes edid block
drm/edid: new drm_edid_block_checksum helper function V3
Takashi Iwai (1):
drm: Fix memory leak at error path of drm_read()
Thierry Reding (2):
drm/edid: Restore kerneldoc consistency
drm: Zero out DRM object memory upon cleanup
Documentation/DocBook/drm.tmpl | 2 +-
drivers/gpu/drm/drm_crtc.c | 13 +++++++++++--
drivers/gpu/drm/drm_edid.c | 42 +++++++++++++++++++++++++++---------------
drivers/gpu/drm/drm_fops.c | 1 +
drivers/gpu/drm/drm_irq.c | 2 +-
5 files changed, 41 insertions(+), 19 deletions(-)
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
[View Less]
These patches replace what appears to be a reference to the name of the
current function but is misspelled in some way by either the name of the
function itself, or by %s and then __func__ in an argument list.
// <smpl>
// sudo apt-get install python-pip
// sudo pip install python-Levenshtein
// spatch requires the argument --in-place
virtual after_start
@initialize:ocaml@
@@
let extensible_functions = ref ([] : string list)
let restarted = ref false
let restart _ =
restarted := …
[View More]true;
let it = new iteration() in
it#add_virtual_rule After_start;
Printf.eprintf "restarting\n";
it#register()
@initialize:python@
@@
import re
from Levenshtein import distance
mindist = 1 // 1 to find only misspellings
maxdist = 2
ignore_leading = True
// ---------------------------------------------------------------------
@r0@
constant char [] c;
identifier f;
@@
f(...,c,...)
@script:ocaml@
c << r0.c;
f << r0.f;
@@
(if not !restarted then restart());
match Str.split_delim (Str.regexp "%") c with
_::_::_ ->
if not (List.mem f !extensible_functions)
then extensible_functions := f :: !extensible_functions
| _ -> ()
// ---------------------------------------------------------------------
@r depends on after_start@
constant char [] c;
position p;
identifier f;
@@
f(...,c@p,...)
@script:python flt@
c << r.c;
p << r.p;
matched;
@@
func = p[0].current_element
wpattern = "[a-zA-Z_][a-zA-Z0-9_]*"
if ignore_leading:
func = func.strip("_")
wpattern = "[a-zA-Z][a-zA-Z0-9_]*"
lf = len(func)
cocci.include_match(False)
// ignore extremely short function names
if lf > 3:
words = [w for w in re.findall(wpattern, c) if abs(len(w) - lf) <= maxdist]
for w in words:
d = distance(w, func)
if mindist <= d and d <= maxdist:
coccinelle.matched = w
cocci.include_match(True)
//print "%s:%d:%s():%d: %s" % (p[0].file, int(p[0].line), func, d, c)
break
@script:ocaml r2@
c << r.c;
f << r.f;
matched << flt.matched;
fixed;
@@
let pieces = Str.split_delim (Str.regexp_string matched) c in
match pieces with
[before;after] ->
let preceeding =
List.length(Str.split (Str.regexp_string "%") before) > 1 in
if preceeding
then Coccilib.include_match false
else
if List.mem f !extensible_functions
then fixed := before ^ "%s" ^ after
else Coccilib.include_match false
| _ -> Coccilib.include_match false
@changed1@
constant char [] r.c;
identifier r2.fixed;
position r.p;
identifier r.f;
@@
f(...,
-c@p
+fixed,__func__
,...)
// -------------------------------------------------------------------
@s depends on after_start@
constant char [] c;
position p;
identifier f;
@@
f(...,c@p,...)
@script:python flt2@
c << s.c;
p << s.p;
matched;
@@
func = p[0].current_element
wpattern = "[a-zA-Z_][a-zA-Z0-9_]*"
if ignore_leading:
func = func.strip("_")
wpattern = "[a-zA-Z][a-zA-Z0-9_]*"
lf = len(func)
cocci.include_match(False)
// ignore extremely short function names
if lf > 3:
words = [w for w in re.findall(wpattern, c) if abs(len(w) - lf) <= maxdist]
for w in words:
d = distance(w, func)
if mindist <= d and d <= maxdist:
coccinelle.matched = w
cocci.include_match(True)
//print "%s:%d:%s():%d: %s" % (p[0].file, int(p[0].line), func, d, c)
break
@script:ocaml s2@
c << s.c;
f << s.f;
p << s.p;
matched << flt2.matched;
fixed;
@@
let ce = (List.hd p).current_element in
let pieces = Str.split_delim (Str.regexp_string matched) c in
match pieces with
[before;after] ->
let preceeding =
List.length(Str.split (Str.regexp_string "%") before) > 1 in
if preceeding
then Coccilib.include_match false
else
if List.mem f !extensible_functions
then Coccilib.include_match false
else fixed := before ^ ce ^ after
| _ -> Coccilib.include_match false
@changed2@
constant char [] s.c;
identifier s2.fixed;
position s.p;
identifier s.f;
@@
f(...,
-c@p
+fixed
,...)
// </smpl>
[View Less]
Hi all,
Today's linux-next merge of the drm-misc tree got a conflict in
drivers/gpu/drm/drm_edid.c between commit 40d9b043a89e ("drm/connector:
store tile information from displayid (v3)") from the drm tree and
commit d6885d659037 ("drm/edid: move drm_edid_is_zero to top, make edid
argument const") and c465bbc87ce3 ("drm/edid: new
drm_edid_block_checksum helper function V3") from the drm-misc tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
…
[View More]Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
diff --cc drivers/gpu/drm/drm_edid.c
index 72fd8820e186,21cc45cf3367..000000000000
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@@ -1015,8 -1014,24 +1015,27 @@@ module_param_named(edid_fixup, edid_fix
MODULE_PARM_DESC(edid_fixup,
"Minimum number of valid EDID header bytes (0-8, default 6)");
+static void drm_get_displayid(struct drm_connector *connector,
+ struct edid *edid);
++
+ static int drm_edid_block_checksum(const u8 *raw_edid)
+ {
+ int i;
+ u8 csum = 0;
+ for (i = 0; i < EDID_LENGTH; i++)
+ csum += raw_edid[i];
+
+ return csum;
+ }
+
+ static bool drm_edid_is_zero(const u8 *in_edid, int length)
+ {
+ if (memchr_inv(in_edid, 0, length))
+ return false;
+
+ return true;
+ }
+
/**
* drm_edid_block_valid - Sanity check the EDID block (base or extension)
* @raw_edid: pointer to raw EDID block
@@@ -1179,34 -1196,8 +1200,26 @@@ drm_do_probe_ddc_edid(void *data, u8 *b
return ret == xfers ? 0 : -1;
}
- static bool drm_edid_is_zero(u8 *in_edid, int length)
- {
- if (memchr_inv(in_edid, 0, length))
- return false;
-
- return true;
- }
-
-static u8 *
-drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
+/**
+ * drm_do_get_edid - get EDID data using a custom EDID block read function
+ * @connector: connector we're probing
+ * @get_edid_block: EDID block read function
+ * @data: private data passed to the block read function
+ *
+ * When the I2C adapter connected to the DDC bus is hidden behind a device that
+ * exposes a different interface to read EDID blocks this function can be used
+ * to get EDID data using a custom block read function.
+ *
+ * As in the general case the DDC bus is accessible by the kernel at the I2C
+ * level, drivers must make all reasonable efforts to expose it as an I2C
+ * adapter and use drm_get_edid() instead of abusing this function.
+ *
+ * Return: Pointer to valid EDID or NULL if we couldn't find any.
+ */
+struct edid *drm_do_get_edid(struct drm_connector *connector,
+ int (*get_edid_block)(void *data, u8 *buf, unsigned int block,
+ size_t len),
+ void *data)
{
int i, j = 0, valid_extensions = 0;
u8 *block, *new;
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=87172
Michel Dänzer <michel(a)daenzer.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Driver/Radeon |DRM/Radeon
Assignee|xorg-driver-ati(a)lists.x.org |dri-devel(a)lists.freedesktop
| |.org
Product|xorg |DRI
QA …
[View More]Contact|xorg-team(a)lists.x.org |
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
Hi all,
Today's linux-next merge of the drm-misc tree got a conflict in
Documentation/DocBook/drm.tmpl between commit 6f134d7bb434 ("drm/tile:
expose the tile property to userspace (v3)") from the drm tree and
commit e2beb6cd5d0f ("drm/Documentation: Fix rowspan value in
drm-kms-properties") from the drm-misc tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
diff --cc …
[View More]Documentation/DocBook/drm.tmpl
index 60c1063d4178,b344bc3b0d77..000000000000
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@@ -2550,8 -2546,8 +2550,8 @@@ void intel_crt_init(struct drm_device *
<td valign="top" >Description/Restrictions</td>
</tr>
<tr>
- <td rowspan="23" valign="top" >DRM</td>
+ <td rowspan="24" valign="top" >DRM</td>
- <td rowspan="3" valign="top" >Generic</td>
+ <td rowspan="4" valign="top" >Generic</td>
<td valign="top" >“EDID”</td>
<td valign="top" >BLOB | IMMUTABLE</td>
<td valign="top" >0</td>
[View Less]
When we unplug a dp mst branch we unreference the entire tree from
the root towards the leaves. Which is ok, since that's the way the
pointers and so also the refcounts go.
But when we drop the reference we must make sure that we remove the
branches/ports from the lists/pointers before dropping the reference.
Otherwise the get_validated functions will still return it instead
of returning NULL (which indicates a potentially on-going unplug).
The mst branch destroy gets this right for ports: …
[View More]First it deletes
the port from the ports list, then it unrefs. But the ports destroy
function gets it wrong: First it unrefs, then it drops the ref. Which
means a zombie mst branch can still be validate with get_validated_mstb_ref
when it shouldn't.
Fix this.
This should address a backtrace Dave dug out somewhere on unplug:
[<ffffffffa00cc262>] drm_dp_mst_get_validated_mstb_ref_locked+0x92/0xa0 [drm_kms_helper]
[<ffffffffa00cc211>] drm_dp_mst_get_validated_mstb_ref_locked+0x41/0xa0 [drm_kms_helper]
[<ffffffffa00cc2aa>] drm_dp_get_validated_mstb_ref+0x3a/0x60 [drm_kms_helper]
[<ffffffffa00cc2fb>] drm_dp_payload_send_msg.isra.14+0x2b/0x100 [drm_kms_helper]
[<ffffffffa00cc547>] drm_dp_update_payload_part1+0x177/0x360 [drm_kms_helper]
[<ffffffffa015c52e>] intel_mst_disable_dp+0x3e/0x80 [i915]
[<ffffffffa013d60b>] haswell_crtc_disable+0x1cb/0x340 [i915]
[<ffffffffa0136739>] intel_crtc_control+0x49/0x100 [i915]
[<ffffffffa0136857>] intel_crtc_update_dpms+0x67/0x80 [i915]
[<ffffffffa013fa59>] intel_connector_dpms+0x59/0x70 [i915]
[<ffffffffa015c752>] intel_dp_destroy_mst_connector+0x32/0xc0 [i915]
[<ffffffffa00cb44b>] drm_dp_destroy_port+0x6b/0xa0 [drm_kms_helper]
[<ffffffffa00cb588>] drm_dp_destroy_mst_branch_device+0x108/0x130 [drm_kms_helper]
[<ffffffffa00cb3cd>] drm_dp_port_teardown_pdt+0x3d/0x50 [drm_kms_helper]
[<ffffffffa00cdb79>] drm_dp_mst_handle_up_req+0x499/0x540 [drm_kms_helper]
[<ffffffff810d9ead>] ? trace_hardirqs_on_caller+0x15d/0x200 [<ffffffffa00cdc73>]
drm_dp_mst_hpd_irq+0x53/0xa00 [drm_kms_helper] [<ffffffffa00c7dfb>]
? drm_dp_dpcd_read+0x1b/0x20 [drm_kms_helper] [<ffffffffa0153ed8>]
? intel_dp_dpcd_read_wake+0x38/0x70 [i915] [<ffffffffa015a225>]
intel_dp_check_mst_status+0xb5/0x250 [i915] [<ffffffffa015ac71>]
intel_dp_hpd_pulse+0x181/0x210 [i915] [<ffffffffa01104f6>]
i915_digport_work_func+0x96/0x120 [i915]
Cc: Dave Airlie <airlied(a)redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter(a)ffwll.ch>
---
drivers/gpu/drm/drm_dp_mst_topology.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 5682d7e9f1ec..71a56d65a0d2 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -839,6 +839,8 @@ static void drm_dp_put_mst_branch_device(struct drm_dp_mst_branch *mstb)
static void drm_dp_port_teardown_pdt(struct drm_dp_mst_port *port, int old_pdt)
{
+ struct drm_dp_mst_branch *mstb;
+
switch (old_pdt) {
case DP_PEER_DEVICE_DP_LEGACY_CONV:
case DP_PEER_DEVICE_SST_SINK:
@@ -846,8 +848,9 @@ static void drm_dp_port_teardown_pdt(struct drm_dp_mst_port *port, int old_pdt)
drm_dp_mst_unregister_i2c_bus(&port->aux);
break;
case DP_PEER_DEVICE_MST_BRANCHING:
- drm_dp_put_mst_branch_device(port->mstb);
+ mstb = port_mstb;
port->mstb = NULL;
+ drm_dp_put_mst_branch_device(mstb);
break;
}
}
--
2.1.1
[View Less]