Merge "disp: msm: sde: print sgl entries in case of mismatch detected"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
005162e33c
@@ -33,22 +33,39 @@ int _sde_vm_validate_sgl(struct gh_sgl_desc *expected,
|
|||||||
{
|
{
|
||||||
u32 idx;
|
u32 idx;
|
||||||
|
|
||||||
|
sort(assigned->sgl_entries, assigned->n_sgl_entries,
|
||||||
|
sizeof(assigned->sgl_entries[0]), __sgl_cmp, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fragmented address spaces are not supported.
|
* fragmented address spaces are not supported.
|
||||||
* So the number of sgl entries is expected to be the same.
|
* So the number of sgl entries is expected to be the same.
|
||||||
*/
|
*/
|
||||||
if (expected->n_sgl_entries != assigned->n_sgl_entries)
|
if (expected->n_sgl_entries != assigned->n_sgl_entries) {
|
||||||
return -E2BIG;
|
SDE_ERROR("expected sgl entries = %d, assigned sgl entries = %d\n",
|
||||||
|
expected->n_sgl_entries, assigned->n_sgl_entries);
|
||||||
|
|
||||||
sort(assigned->sgl_entries, assigned->n_sgl_entries,
|
for (idx = 0; idx < expected->n_sgl_entries; idx++) {
|
||||||
sizeof(assigned->sgl_entries[0]), __sgl_cmp, NULL);
|
struct gh_sgl_entry *e = &expected->sgl_entries[idx];
|
||||||
|
|
||||||
|
SDE_ERROR("expected sgl entry: (0x%llx - %llx)\n",
|
||||||
|
e->ipa_base, e->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (idx = 0; idx < assigned->n_sgl_entries; idx++) {
|
||||||
|
struct gh_sgl_entry *a = &assigned->sgl_entries[idx];
|
||||||
|
|
||||||
|
SDE_ERROR("assigned sgl entry: (0x%llx - %llx)\n",
|
||||||
|
a->ipa_base, a->size);
|
||||||
|
}
|
||||||
|
return -E2BIG;
|
||||||
|
}
|
||||||
|
|
||||||
for (idx = 0; idx < expected->n_sgl_entries; idx++) {
|
for (idx = 0; idx < expected->n_sgl_entries; idx++) {
|
||||||
struct gh_sgl_entry *e = &expected->sgl_entries[idx];
|
struct gh_sgl_entry *e = &expected->sgl_entries[idx];
|
||||||
struct gh_sgl_entry *a = &assigned->sgl_entries[idx];
|
struct gh_sgl_entry *a = &assigned->sgl_entries[idx];
|
||||||
|
|
||||||
if ((e->ipa_base != a->ipa_base) || (e->size != a->size)) {
|
if ((e->ipa_base != a->ipa_base) || (e->size != a->size)) {
|
||||||
SDE_DEBUG("sgl mismatch: (%llu - %llu) vs (%llu - %llu)\n",
|
SDE_ERROR("sgl mismatch: (%llu - %llu) vs (%llu - %llu)\n",
|
||||||
e->ipa_base, e->size, a->ipa_base, a->size);
|
e->ipa_base, e->size, a->ipa_base, a->size);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user