[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

jamesstewartmil...@gmail.com changed:

   What|Removed |Added

   Severity|major   |critical
   Priority|medium  |high

--- Comment #2 from jamesstewartmil...@gmail.com ---
I've changed the status to critical since I am unable to load the radeon driver
at all.
However, I am getting a report from glxinfo that looks like the radeon driver
is loaded, unless it is running in software.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107328] radeon_gart_table_vram_pin takes 473 ms during ACPI S3 resume

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107328

Bug ID: 107328
   Summary: radeon_gart_table_vram_pin takes 473 ms during ACPI S3
resume
   Product: DRI
   Version: DRI git
  Hardware: Other
OS: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
  Assignee: dri-devel@lists.freedesktop.org
  Reporter: pmenzel+bugs.freedesk...@molgen.mpg.de

Created attachment 140760
  --> https://bugs.freedesktop.org/attachment.cgi?id=140760&action=edit
Screenshot from HTML output of `sleepgraph.py` with `devicefilter: radeon` and
`maxdepth: 20`

On a ASRock E350M1 with Linux 4.18-rc5+, profiling ACPI S3 suspend and resume
time with `sleepgraph.py` from pm-graph [1], the radeon module over half a
second to resume, which is also visible adding `initcall_debug` to the command
line.

> radeon @ :00:01.0 {radeon} async_device (Total Suspend: 36.541 ms Total 
> Resume: 687.797 ms)

evergreen_startup [radeon] (562.983 ms @ 403.615437)
→ radeon_gart_table_vram_pin [radeon] (473.376 ms @ 403.617537)

The function from `drivers/gpu/drm/radeon/radeon_gart.c` looks like below, and
the problem is the for loop in the end.

/**
 * radeon_gart_table_vram_pin - pin gart page table in vram
 *
 * @rdev: radeon_device pointer
 *
 * Pin the GART page table in vram so it will not be moved
 * by the memory manager (pcie r4xx, r5xx+).  These asics require the
 * gart table to be in video memory.
 * Returns 0 for success, error for failure.
 */
int radeon_gart_table_vram_pin(struct radeon_device *rdev)
{
uint64_t gpu_addr;
int r;

r = radeon_bo_reserve(rdev->gart.robj, false);
if (unlikely(r != 0))
return r;
r = radeon_bo_pin(rdev->gart.robj,
RADEON_GEM_DOMAIN_VRAM, &gpu_addr);
if (r) {
radeon_bo_unreserve(rdev->gart.robj);
return r;
}
r = radeon_bo_kmap(rdev->gart.robj, &rdev->gart.ptr);
if (r)  
radeon_bo_unpin(rdev->gart.robj);
radeon_bo_unreserve(rdev->gart.robj);
rdev->gart.table_addr = gpu_addr;

if (!r) {
int i;

/* We might have dropped some GART table updates while it
wasn't
 * mapped, restore all entries
 */
for (i = 0; i < rdev->gart.num_gpu_pages; i++)
radeon_gart_set_page(rdev, i,
rdev->gart.pages_entry[i]);
mb();
radeon_gart_tlb_flush(rdev);
}

return r;
}

Is there a way to get rid of the for loop? Some memset equivalent?

[1]: https://github.com/01org/pm-graph

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

--- Comment #3 from jamesstewartmil...@gmail.com ---
I've attached a separate screen via the displayport, and the radeon driver
loads and I get the second monitor as a secondary screen, from which I can
access kscreen through the settings dialog and then set as the primary.
Throughout this time, the secondary display is working but is dark in
comparison to what I would expect, but the primary screen, the imac, is a black
screen except for tear type artefacts like barely visible equidistant lines
floating upwards.
I would guess that the edid is reported incorrectly, as the imac screen is
reported in the settings dialog as 'laptop'.
I'm going to try obtaining and setting an edid etc now.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

jamesstewartmil...@gmail.com changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #4 from jamesstewartmil...@gmail.com ---


*** This bug has been marked as a duplicate of bug 98046 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

jamesstewartmil...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

jamesstewartmil...@gmail.com changed:

   What|Removed |Added

 Resolution|DUPLICATE   |---
 Status|VERIFIED|REOPENED

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

jamesstewartmil...@gmail.com changed:

   What|Removed |Added

 Status|REOPENED|NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] ALSA: hda/i915: Allow delayed i915 audio component binding

2018-07-22 Thread Takashi Iwai
Currently HD-audio i915 audio binding doesn't support any delayed
binding, and supposes that the i915 driver registers the component
immediately.  This has been OK, so far, but the work-in-progress
change in i915 may introduce the asynchronous binding, which
effectively delays the component registration.

For addressing it, implement a completion to be synced with the master
binding.  The timeout is set to 10 seconds which should be long enough
and hopefully be not too annoying if anyone boots up a debugging
session with i915 KMS turned off.

Signed-off-by: Takashi Iwai 
---

This is applied on top of the current for-next or topic/drm_audio_component
branch of sound git tree.

 sound/hda/hdac_i915.c | 24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index 8f2aa8bc1185..b5282cbbe489 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+static struct completion bind_complete;
+
 #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \
((pci)->device == 0x0c0c) || \
((pci)->device == 0x0d0c) || \
@@ -97,6 +99,19 @@ static bool i915_gfx_present(void)
return pci_dev_present(ids);
 }
 
+static int i915_master_bind(struct device *dev,
+   struct drm_audio_component *acomp)
+{
+   complete_all(&bind_complete);
+   /* clear audio_ops here as it was needed only for completion call */
+   acomp->audio_ops = NULL;
+   return 0;
+}
+
+static const struct drm_audio_component_audio_ops i915_init_ops = {
+   .master_bind = i915_master_bind
+};
+
 /**
  * snd_hdac_i915_init - Initialize i915 audio component
  * @bus: HDA core bus
@@ -117,7 +132,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!i915_gfx_present())
return -ENODEV;
 
-   err = snd_hdac_acomp_init(bus, NULL,
+   init_completion(&bind_complete);
+
+   err = snd_hdac_acomp_init(bus, &i915_init_ops,
  i915_component_master_match,
  sizeof(struct i915_audio_component) - 
sizeof(*acomp));
if (err < 0)
@@ -125,8 +142,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
acomp = bus->audio_component;
if (!acomp)
return -ENODEV;
-   if (!acomp->ops)
+   if (!acomp->ops) {
request_module("i915");
+   /* 10s timeout */
+   wait_for_completion_timeout(&bind_complete, 10 * 1000);
+   }
if (!acomp->ops) {
snd_hdac_acomp_exit(bus);
return -ENODEV;
-- 
2.18.0

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 200531] amdgpu: *ERROR* REG_WAIT timeout when a display is put to sleep

2018-07-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200531

--- Comment #4 from Aleksandr Mezin (mezin.alexan...@gmail.com) ---
After more testing:
1. "unable to handle kernel NULL pointer dereference" doesn't happen with
4.18-rc5
2. GUI/GPU driver still freezes at some point. Usually I need to leave the
system turned on but with monitors in standby. Only "REG_WAIT timeout" errors
in dmesg.
3. "REG_WAIT timeout" only happens with 2 monitors connected. Dell P2415Q and
LG 27UD69P, both connected through DisplayPort

How to reproduce "REG_WAIT timeout":
1) `xset dpms force off`
2) Wait for both monitors to turn off (backlight should turn off, "no signal"
messages disappear)
3) "REG_WAIT timeout" will happen when you'll press a key/move the mouse - when
the monitors are waking up (I've checked dmesg over SSH from another machine).

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 200621] New: Freezing with amdgpu driver

2018-07-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200621

Bug ID: 200621
   Summary: Freezing with amdgpu driver
   Product: Drivers
   Version: 2.5
Kernel Version: 4.17.6-200.fc28.x86_64
  Hardware: All
OS: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: Video(DRI - non Intel)
  Assignee: drivers_video-...@kernel-bugs.osdl.org
  Reporter: jon...@gmail.com
Regression: No

Created attachment 277463
  --> https://bugzilla.kernel.org/attachment.cgi?id=277463&action=edit
dmesg out from amdgpu freeze

RX560, Ryzen 1700X, MSI B350 Tomawhawk

Complete freezes a few times a day.  Seems to typically be when the monitors
are being woken from sleep, but not always.  I have three monitors connected,
one each via:  displayport, hdmi and dvi (gpu) to hdmi (monitor).  The mouse
cursor will still move, but clicking doesn't have any affect, keyboard doesn't
work, can't switch to virtual terminals, numlock light frozen.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 200621] Freezing with amdgpu driver

2018-07-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200621

--- Comment #1 from Jon (jon...@gmail.com) ---
I believe this may be related to the new AMD DC that was enabled by default for
all GPU as of 4.17.  I have disabled it via amdgpu.dc=0 in the boot parameters
and I will report back.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

--- Comment #5 from jamesstewartmil...@gmail.com ---
I'm not sure if it is a duplicate or not as it happens of bug 98046

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 200531] amdgpu: *ERROR* REG_WAIT timeout when a display is put to sleep

2018-07-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=200531

--- Comment #5 from Aleksandr Mezin (mezin.alexan...@gmail.com) ---
"REG_WAIT timeout" doesn't occur with kernel built from "amd-staging-drm-next"
branch from https://cgit.freedesktop.org/~agd5f/linux/. I can't find the exact
commit because after some commits the system just doesn't boot.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107328] radeon_gart_table_vram_pin takes 473 ms during ACPI S3 resume

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107328

Christian König  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Christian König  ---
(In reply to Paul Menzel from comment #0)
> Is there a way to get rid of the for loop? Some memset equivalent?

At least not easily. 

The hardware is not initialized yet, so we have to writeback the GART table
using the CPU.

Depending on the size of the table (which in turn depends on installed system
memory) it can easily take even more than a second to do this.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

--- Comment #6 from Christian König  ---
Please provide a full dmesg output as attachment.

"modprobe: ERROR: could not insert 'radeon': Invalid argument" either means
that your hardware isn't supported for some reason or you manually provided an
invalid setting.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 107324] Radeon driver fails to install with modprobe: ERROR: could not insert 'radeon': Invalid argument

2018-07-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107324

Christian König  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

-- 
You are receiving this mail because:
You are the assignee for the bug.___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: linux-next: build failure after merge of the drm-intel tree

2018-07-22 Thread Stephen Rothwell
Hi all,

On Fri, 13 Jul 2018 11:54:19 +1000 Stephen Rothwell  
wrote:
>
> [Dave cc'd because this will probably turn up in the drm tree soon.]

And now it has ...

> After merging the drm-intel tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'gvt_dma_map_page':
> drivers/gpu/drm/i915/gvt/kvmgt.c:188:17: error: 'pfn' undeclared (first use 
> in this function); did you mean 'gfn'?
>   if (!pfn_valid(pfn)) {
>  ^~~
> 
> Caused by commit
> 
>   79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages")
> 
> interacting with commit
> 
>   39b4cbadb9a9 ("drm/i915/kvmgt: Check the pfn got from vfio_pin_pages")
> 
> from Linus' tree (v4.18-rc1).
> 
> I added the following merge fix patch:
> 
> From: Stephen Rothwell 
> Date: Fri, 13 Jul 2018 11:48:41 +1000
> Subject: [PATCH] drm/i915/kvmgt: merge fixup for "Check the pfn got from
>  vfio_pin_pages"
> 
> Signed-off-by: Stephen Rothwell 
> ---
>  drivers/gpu/drm/i915/gvt/kvmgt.c | 6 --
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c 
> b/drivers/gpu/drm/i915/gvt/kvmgt.c
> index 718ab307a500..4d2f53ae9f0f 100644
> --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
> +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
> @@ -185,12 +185,6 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, 
> unsigned long gfn,
>   if (ret)
>   return ret;
>  
> - if (!pfn_valid(pfn)) {
> - gvt_vgpu_err("pfn 0x%lx is not mem backed\n", pfn);
> - vfio_unpin_pages(mdev_dev(vgpu->vdev.mdev), &gfn, 1);
> - return -EINVAL;
> - }
> -
>   /* Setup DMA mapping. */
>   *dma_addr = dma_map_page(dev, page, 0, size, PCI_DMA_BIDIRECTIONAL);
>   ret = dma_mapping_error(dev, *dma_addr);

-- 
Cheers,
Stephen Rothwell


pgpbG4FSApSDG.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


linux-next: manual merge of the drm-msm tree with the drm tree

2018-07-22 Thread Stephen Rothwell
Hi Rob,

Today's linux-next merge of the drm-msm tree got a conflict in:

  drivers/gpu/drm/msm/dsi/dsi_manager.c

between commit:

  97e14fbeb53f ("drm: drop _mode_ from remaining connector functions")

from the drm tree and commit:

  b6a221993e7c ("drm/msm/dsi: Use one connector for dual DSI mode")

from the drm-msm tree.

I fixed it up (the latter removed code modified by the former) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the
conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpJciMu3mzhS.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


linux-next: build failure after merge of the drm-msm tree

2018-07-22 Thread Stephen Rothwell
Hi Rob,

[Dave, this will presumably soon turn up in the drm tree]

After merging the drm-msm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c: In function 'dpu_plane_destroy':
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1483:3: error: too few arguments to 
function 'drm_plane_helper_disable'
   drm_plane_helper_disable(plane);
   ^~~~
In file included from drivers/gpu/drm/msm/msm_drv.h:43:0,
 from drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:24:
include/drm/drm_plane_helper.h:72:5: note: declared here
 int drm_plane_helper_disable(struct drm_plane *plane,
 ^~~~

Caused by commit

  drm_plane_helper_disable ("drm/msm: Add SDM845 DPU support")

interacting with commit

  070473bcf703 ("drm: add missing ctx argument to plane transitional helpers")

from the drm tree.

I have added this merge fix patch.

From: Stephen Rothwell 
Date: Mon, 23 Jul 2018 12:47:04 +1000
Subject: [PATCH] drm: msm: merge fix for drm_plane_helper_disable() API change

Signed-off-by: Stephen Rothwell 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index d3d7ebf0c394..b640e39ebaca 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1480,7 +1480,7 @@ static void dpu_plane_destroy(struct drm_plane *plane)
 
mutex_destroy(&pdpu->lock);
 
-   drm_plane_helper_disable(plane);
+   drm_plane_helper_disable(plane, NULL);
 
/* this will destroy the states as well */
drm_plane_cleanup(plane);
-- 
2.18.0

-- 
Cheers,
Stephen Rothwell


pgplmKMd1vmdi.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel