[Bug 96908] [radeonsi] MSAA causes graphical artifacts

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=96908

--- Comment #8 from Nicolai Hähnle  ---
The patch at https://patchwork.freedesktop.org/patch/99101/ fixes the problem
for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/824f4bc5/attachment.html>


[PATCH v3 1/2] dt-bindings: tc358767: add DT documentation

2016-07-16 Thread Rob Herring
On Wed, Jul 13, 2016 at 09:07:10AM +0200, Philipp Zabel wrote:
> Add DT binding documentation for the Toshiba TC358767 eDP bridge.
> 
> Signed-off-by: Philipp Zabel 
> ---
>  .../bindings/display/bridge/toshiba,tc358767.txt   | 51 
> ++
>  1 file changed, 51 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt 
> b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> new file mode 100644
> index 000..05ada28
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> @@ -0,0 +1,51 @@
> +Toshiba TC358767 eDP bridge bindings
> +
> +Required properties:
> + - compatible: "toshiba,tc358767"
> + - reg: i2c address of the bridge, 0x68 or 0x0f, depending on bootstrap pins
> + - clock-names: should be "ref"
> + - clocks: OF device-tree clock specification for refclk input. The reference
> +   clock rate must be 13 MHz, 19.2 MHz, 26 MHz, or 38.4 MHz.
> +
> +Optional properties:
> + - shutdown-gpios: OF device-tree gpio specification for SD pin
> +   (active high shutdown input)
> + - reset-gpios: OF device-tree gpio specification for RSTX pin
> +(active low system reset)
> + - ports: the ports node can contain video interface port nodes to connect
> +   to a DPI/DSI source and to an eDP/DP sink according to [1][2]:
> +- port at 0: DSI input port
> +- port at 1: DPI input port
> +- port at 2: eDP/DP output port
> +
> +[1]: Documentation/devicetree/bindings/graph.txt
> +[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
> +
> +Example:
> + edp-bridge at 68 {
> + compatible = "toshiba,tc358767";
> + reg = <0x68>;
> + shutdown-gpios = < 23 GPIO_ACTIVE_HIGH>;
> + reset-gpios = < 24 GPIO_ACTIVE_LOW>;
> + clock-names = "ref";
> + clocks = <_refclk>;
> +
> + ports {

You are missing #size-cells and #address-cells here, otherwise:

Acked-by: Rob Herring 

> + port at 1 {
> + reg = <1>;
> +
> + bridge_in: endpoint {
> + remote-endpoint = <_out>;
> + };
> + };
> +
> + port at 2 {
> + reg = <2>;
> +
> + bridge_out: endpoint {
> + remote-endpoint = <_in>;
> + };
> + };
> + };
> + };
> +
> -- 
> 2.8.1
> 


[PATCH 8/8] drm/amd/powerplay: Delete an unnecessary variable initialisation in phm_dispatch_table()

2016-07-16 Thread SF Markus Elfring
>From 0bf6f3c40786e12d3d42672f1d56296b30e17ac9 Mon Sep 17 00:00:00 2001
From: Markus Elfring 
Date: Sat, 16 Jul 2016 15:50:18 +0200
Subject: [PATCH 8/8] drm/amd/powerplay: Delete an unnecessary variable
 initialisation in phm_dispatch_table()

The variable "result" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
index 735aeb0..fdfed63 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
@@ -59,7 +59,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
   struct phm_runtime_table_header *rt_table,
   void *input, void *output)
 {
-   int result = 0;
+   int result;
void *temp_storage;

if (hwmgr == NULL || rt_table == NULL) {
-- 
2.9.1



[PATCH 7/8] drm/amd/powerplay: Change assignment for a buffer variable in phm_dispatch_table()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 15:36:36 +0200

The variable "temp_storage" was eventually reassigned with a pointer.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
index 024e22e..735aeb0 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
@@ -60,7 +60,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
   void *input, void *output)
 {
int result = 0;
-   void *temp_storage = NULL;
+   void *temp_storage;

if (hwmgr == NULL || rt_table == NULL) {
printk(KERN_ERR "[ powerplay ] Invalid Parameter!\n");
@@ -73,7 +73,8 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
printk(KERN_ERR "[ powerplay ] Could not allocate table 
temporary storage\n");
return -ENOMEM;
}
-   }
+   } else
+   temp_storage = NULL;

result = phm_run_table(hwmgr, rt_table, input, output, temp_storage);
kfree(temp_storage);
-- 
2.9.1



[PATCH 6/8] drm/amdgpu: Change assignment for a variable in amdgpu_cgs_acpi_eval_object()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 15:05:45 +0200

Indicate successful function execution only at the end.
Thus omit initialisation for the variable "result" at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 47f2a43..57859bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -908,7 +908,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
struct cgs_acpi_method_argument *argument;
uint32_t i, count;
acpi_status status;
-   int result = 0;
+   int result;

handle = ACPI_HANDLE(>pdev->dev);
if (!handle)
@@ -1049,6 +1049,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
params++;
}

+   result = 0;
 free_obj:
kfree(obj);
 free_input:
-- 
2.9.1



[PATCH 5/8] drm/amdgpu: Delete an unnecessary variable initialisation in amdgpu_cgs_acpi_eval_object()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 14:54:12 +0200

The variable "argument" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index f5de510..47f2a43 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -905,7 +905,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *params, *obj;
uint8_t name[5] = {'\0'};
-   struct cgs_acpi_method_argument *argument = NULL;
+   struct cgs_acpi_method_argument *argument;
uint32_t i, count;
acpi_status status;
int result = 0;
-- 
2.9.1



[PATCH v2] drm/radeon: Remove deprecated create_singlethread_workqueue

2016-07-16 Thread Bhaktipriya Shridhar

alloc_workqueue replaces deprecated create_singlethread_workqueue().

Each hardware CRTC has a single flip work queue.
When a radeon_flip_work_func item is queued, it needs to be executed
ASAP because even a slight delay may cause the flip to be delayed by
one refresh cycle.

Hence, a dedicated workqueue with WQ_HIGHPRI set, has been used here
since a delay can cause the outcome to miss the refresh cycle.

Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary here.

Signed-off-by: Bhaktipriya Shridhar 
---
 Changes in v2:
-Used a dedicated work queue with WQ_HIGHPRI

 drivers/gpu/drm/radeon/radeon_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c 
b/drivers/gpu/drm/radeon/radeon_display.c
index 6a41b49..64b246e 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -711,7 +711,7 @@ static void radeon_crtc_init(struct drm_device *dev, int 
index)

drm_mode_crtc_set_gamma_size(_crtc->base, 256);
radeon_crtc->crtc_id = index;
-   radeon_crtc->flip_queue = create_singlethread_workqueue("radeon-crtc");
+   radeon_crtc->flip_queue = alloc_workqueue("radeon-crtc", WQ_HIGHPRI, 0);
rdev->mode_info.crtcs[index] = radeon_crtc;

if (rdev->family >= CHIP_BONAIRE) {
--
2.1.4



[PATCH 5/8] drm/amdgpu: Delete an unnecessary variable initialisation in amdgpu_cgs_acpi_eval_object()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 14:54:12 +0200

The variable "argument" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index f5de510..47f2a43 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -905,7 +905,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *params, *obj;
uint8_t name[5] = {'\0'};
-   struct cgs_acpi_method_argument *argument = NULL;
+   struct cgs_acpi_method_argument *argument;
uint32_t i, count;
acpi_status status;
int result = 0;
-- 
2.9.1



[PATCH 4/8] drm/amdgpu: Delete a variable in amdgpu_cgs_acpi_eval_object()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 14:00:28 +0200

The local variable "func_no" was assigned a value at two places.
But it was not read within this function. Thus delete it.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 705bfa2..f5de510 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -909,7 +909,6 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
uint32_t i, count;
acpi_status status;
int result = 0;
-   uint32_t func_no = 0x;

handle = ACPI_HANDLE(>pdev->dev);
if (!handle)
@@ -926,7 +925,6 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
if (info->pinput_argument == NULL)
return -EINVAL;
argument = info->pinput_argument;
-   func_no = argument->value;
for (i = 0; i < info->input_count; i++) {
if (((argument->type == ACPI_TYPE_STRING) ||
 (argument->type == ACPI_TYPE_BUFFER)) &&
-- 
2.9.1



[PATCH 3/8] drm/amdgpu: One function call less in amdgpu_cgs_acpi_eval_object() after error detection

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 13:43:44 +0200

The kfree() function was called in one case by the
amdgpu_cgs_acpi_eval_object() function during error handling
even if the passed variable "obj" contained a null pointer.

* Adjust jump targets according to the Linux coding style convention.

* Delete unnecessary initialisations for the variables "obj"
  and "params" then.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 6f11bc1..705bfa2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -903,8 +903,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
acpi_handle handle;
struct acpi_object_list input;
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
-   union acpi_object *params = NULL;
-   union acpi_object *obj = NULL;
+   union acpi_object *params, *obj;
uint8_t name[5] = {'\0'};
struct cgs_acpi_method_argument *argument = NULL;
uint32_t i, count;
@@ -996,7 +995,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,

if (ACPI_FAILURE(status)) {
result = -EIO;
-   goto error;
+   goto free_input;
}

/* return the output info */
@@ -1006,7 +1005,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
if ((obj->type != ACPI_TYPE_PACKAGE) ||
(obj->package.count != count)) {
result = -EIO;
-   goto error;
+   goto free_obj;
}
params = obj->package.elements;
} else
@@ -1014,13 +1013,13 @@ static int amdgpu_cgs_acpi_eval_object(struct 
cgs_device *cgs_device,

if (params == NULL) {
result = -EIO;
-   goto error;
+   goto free_obj;
}

for (i = 0; i < count; i++) {
if (argument->type != params->type) {
result = -EIO;
-   goto error;
+   goto free_obj;
}
switch (params->type) {
case ACPI_TYPE_INTEGER:
@@ -1030,7 +1029,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
if ((params->string.length != argument->data_length) ||
(params->string.pointer == NULL)) {
result = -EIO;
-   goto error;
+   goto free_obj;
}
strncpy(argument->pointer,
params->string.pointer,
@@ -1039,7 +1038,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
case ACPI_TYPE_BUFFER:
if (params->buffer.pointer == NULL) {
result = -EIO;
-   goto error;
+   goto free_obj;
}
memcpy(argument->pointer,
params->buffer.pointer,
@@ -1052,8 +1051,9 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
params++;
}

-error:
+free_obj:
kfree(obj);
+free_input:
kfree((void *)input.pointer);
return result;
 }
-- 
2.9.1



[PATCH 2/8] drm/amdgpu/powerplay: Delete unnecessary checks before the function call "kfree"

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 12:38:12 +0200

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c  | 3 +--
 drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c | 5 +
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index cf6f49f..6f11bc1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -1053,8 +1053,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device 
*cgs_device,
}

 error:
-   if (obj != NULL)
-   kfree(obj);
+   kfree(obj);
kfree((void *)input.pointer);
return result;
 }
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
index 7a705ce..024e22e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/functiontables.c
@@ -76,10 +76,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
}

result = phm_run_table(hwmgr, rt_table, input, output, temp_storage);
-
-   if (NULL != temp_storage)
-   kfree(temp_storage);
-
+   kfree(temp_storage);
return result;
 }

-- 
2.9.1



[PATCH 1/8] drm/amdgpu: Delete an unnecessary check before drm_gem_object_unreference_unlocked()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 11:28:36 +0200

The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index a6eecf6..2a07b15 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -516,9 +516,7 @@ static void amdgpu_user_framebuffer_destroy(struct 
drm_framebuffer *fb)
 {
struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);

-   if (amdgpu_fb->obj) {
-   drm_gem_object_unreference_unlocked(amdgpu_fb->obj);
-   }
+   drm_gem_object_unreference_unlocked(amdgpu_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(amdgpu_fb);
 }
-- 
2.9.1



[PATCH 0/8] drm/amdgpu: Fine-tuning for three function implementations

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 16:23:21 +0200

Further update suggestions were taken into account after patches
were applied from static source code analysis.

Markus Elfring (8):
  Delete an unnecessary check before drm_gem_object_unreference_unlocked()
  Delete unnecessary checks before the function call "kfree"
  One function call less in amdgpu_cgs_acpi_eval_object() after error detection
  Delete a variable in amdgpu_cgs_acpi_eval_object()
  Delete an unnecessary variable initialisation in amdgpu_cgs_acpi_eval_object()
  Change assignment for a variable in amdgpu_cgs_acpi_eval_object()
  Change assignment for a buffer variable in phm_dispatch_table()
  Delete an unnecessary variable initialisation in phm_dispatch_table()

 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c| 28 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c|  4 +---
 .../gpu/drm/amd/powerplay/hwmgr/functiontables.c   | 12 --
 3 files changed, 19 insertions(+), 25 deletions(-)

-- 
2.9.1



[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad[always], saints row 4[always], dead island[always], grid autosport[sometimes])

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

Daniel T.  changed:

   What|Removed |Added

Summary|HD6950 GPU lockup loop with |HD6950 GPU lockup loop with
   |various steam games |various steam games
   |(octodad, saints row 4, |(octodad[always], saints
   |dead island, grid   |row 4[always], dead
   |autosport)  |island[always], grid
   ||autosport[sometimes])

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/71710748/attachment.html>


[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, dead island, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

--- Comment #17 from Daniel T.  ---
Created attachment 125109
  --> https://bugs.freedesktop.org/attachment.cgi?id=125109=edit
Octodad call 30070 vertex shader dump

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/b36da7cd/attachment.html>


[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, dead island, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

--- Comment #16 from Daniel T.  ---
Created attachment 125108
  --> https://bugs.freedesktop.org/attachment.cgi?id=125108=edit
Octodad call 30070 fragment shader dump

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/46af1c14/attachment.html>


[Nouveau] [PATCH v3] drm/nouveau/fb/nv50: set DMA mask before mapping scratch page

2016-07-16 Thread Alexandre Courbot
On Sat, Jul 16, 2016 at 4:45 AM, Ard Biesheuvel
 wrote:
> On 15 July 2016 at 07:52, Alexandre Courbot  wrote:
>> On Fri, Jul 8, 2016 at 1:59 AM, Ard Biesheuvel
>>  wrote:
>>> The 100c08 scratch page is mapped using dma_map_page() before the TTM
>>> layer has had a chance to set the DMA mask. This means we are still
>>> running with the default of 32 when this code executes, and this causes
>>> problems for platforms with no memory below 4 GB (such as AMD Seattle)
>>>
>>> So move the dma_map_page() to the .init hook, and set the streaming DMA
>>> mask based on the MMU subdev parameters before performing the call.
>>>
>>> Signed-off-by: Ard Biesheuvel 
>>> ---
>>> I am sure there is a much better way to address this, but this fixes the
>>> problem I get on AMD Seattle with a GeForce 210 PCIe card:
>>>
>>>nouveau :02:00.0: enabling device ( -> 0003)
>>>nouveau :02:00.0: NVIDIA GT218 (0a8280b1)
>>>nouveau :02:00.0: bios: version 70.18.a6.00.00
>>>nouveau :02:00.0: fb ctor failed, -14
>>>nouveau: probe of :02:00.0 failed with error -14
>>>
>>> v2: replace incorrect comparison of dma_addr_t type var against NULL
>>> v3: rework code to get rid of DMA_ERROR_CODE references, which is not
>>> defined on all architectures
>>>
>>>  drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 40 ++--
>>>  1 file changed, 29 insertions(+), 11 deletions(-)
>>
>> I think the same problem exists in fb/gf100.c, would be nice to fix it
>> there as well.
>>
>> I have faced similar issues on Tegra before. I wonder whether this
>> could not be addressed the same way I did, i.e. by setting a
>> temporary, fail-safe DMA mask in nvkm_device_pci_new()? That would
>> allow all subdevs to map pages to the device safely in their init.
>> With your solution, each subdev in that scenario needs to set a DMA
>> mask to be safe.
>>
>> Not sure whether that's practical as I suppose you want to make the
>> DMA mask larger than 32 bits?
>>
>
> Yes. This particular device supports 40 bits (judging from the MMU
> driver code) of physical address space, and RAM starts at
> 0x80__ on AMD Seattle, so we need all 40 bits.
>
>> If you absolutely need to do this in the device, can we move the DMA
>> mask setting logic in nouveau_ttm into its own function and call it
>> from the FB driver to make sure the mask is correctly set? Maybe this
>> could even be made a MMU function and called during MMU ctor or init
>> (in the latter case we would also need to reorder MMU init to make it
>> happen before FB and INSTMEM).
>
> Happy to have stab at implementing this, but I'd like some buy in from
> the maintainer first before I dive into this. Ben is the person to
> give his blessing, I suppose? He has not responded to any of my
> postings so far, unfortunately.

A patch would make it easier to judge whether this is the right thing
to do, but let's hear what Ben thinks about it.


[pull] drm/msm: msm-next for 4.8

2016-07-16 Thread Rob Clark
Hi Dave,

This time, a bunch of cleanups and refactoring work so that we can get
dt bindings upstream.  In general, we keep compatibility with existing
downstream bindings as much as possible, to make backports to device
kernels easier, but now we have cleaner upstream bindings so that we
can start landing gpu/display support in upstream dts files.

Plus shrinker and madvise support, which has been on my todo list for
a long time.  And support for arbitrary # of cmd bufs in submit ioctl
(I've got libdrm+mesa userspace for this on branches) to enable some
of the mesa batch/reorder stuff I'm working on.  Userspace decides
whether this is supported based on advertised driver version.  For the
interesting userspace bits, see:

  
https://github.com/freedreno/libdrm/commit/1baf03ac6e77049d9c8be1e3d5164283ce82c9db

Plus support for ASoC hdmi audio codec, and few other random other
cleanups.

BR,
-R


The following changes since commit 2d635fded22b71381b01e194a59544f2e8d71ef0:

  Merge tag 'drm-vc4-next-2016-07-15' of
https://github.com/anholt/linux into drm-next (2016-07-16 11:25:11
+1000)

are available in the git repository at:

  git://people.freedesktop.org/~robclark/linux msm-next

for you to fetch changes up to 0a677125d0ff726ed3d75ab311cf54674bf512bc:

  drm/msm: Delete an unnecessary check before
drm_gem_object_unreference() (2016-07-16 10:29:35 -0400)


Archit Taneja (33):
  drm/msm: Use correct type for physical addresses
  drm/msm: Print the correct virtual addresses in map/unmap funcs
  drm/msm/mdp5: Don't get source of MDP core clock
  drm/msm/mdp4: Clean up some MDP4 clocks
  dt-bindings: msm/mdp: Fix up clock related bindings
  drm/msm/dsi: Modify port parsing
  drm/msm/dsi: Use generic PHY bindings
  drm/msm/dsi: Use a standard DT binding for data lanes
  dt-bindings: msm/dsi: Use standard data lanes binding
  dt-bindings: msm/dsi: Modify port and PHY bindings
  dt-bindings: msm/dsi: Add assigned clocks bindings
  dt-bindings: msm/dsi: Some binding doc cleanups
  drm/msm: Drop the id_table in platform_driver
  drm/msm: Remove unused fields
  drm/msm: Get irq number within kms driver itself
  drm/msm/mdp5: Add MDSS top level driver
  drm/msm/mdp5: Create a separate MDP5 device
  drm/msm/mdp5: Prepare new kms_init funcs
  drm/msm/mdp5: Use the new hierarchy and drop old irq management
  drm/msm/mdp5: Remove old kms init/destroy funcs
  drm/msm/mdp5: Use updated MDP5 register names
  drm/msm/mdp5: Update the register offsets of MDP5 sub-blocks
  drm/msm: Call pm_runtime_enable/disable for newly created devices
  drm/msm/mdp5: Add missing mdp5_enable/disable calls
  drm/msm: Create separate funcs for adding display/gpu components
  drm/msm: Add display components by parsing MDP ports
  drm/msm: Add components for MDP5
  drm/msm: Drop the gpu binding
  drm/msm/mdp5: Update compatible strings for MDSS/MDP5
  drm/msm/dsi: Don't get DSI index from DT
  dt-bindings: msm/mdp4: Create a separate binding doc for MDP4
  dt-bindings: msm/mdp5: Add MDP5 display bindings
  dt-bindings: msm/mdp: Provide details on MDP interface ports

Dan Carpenter (1):
  drm/msm: return -EFAULT instead of bytes remaining

Laurent Pinchart (1):
  drm/msm: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()

Markus Elfring (3):
  drm/msm/hdmi: Delete an unnecessary check before the function call "kfree"
  drm/msm: Delete unnecessary checks before
drm_gem_object_unreference_unlocked()
  drm/msm: Delete an unnecessary check before drm_gem_object_unreference()

Peter Chen (1):
  drm/msm: add missing of_node_put after calling of_parse_phandle

Rob Clark (10):
  drm/msm: use mutex_lock_interruptible for submit ioctl
  drm/msm: add madvise ioctl
  drm/msm: add put_iova() helper
  drm/msm: shrinker support
  drm/msm: change gem->vmap() to get/put
  drm/msm: wire up vmap shrinker
  drm/msm: deal with arbitrary # of cmd buffers
  drm/msm: bump kernel api version
  drm/msm/rd: split out snapshot_buf helper
  drm/msm/rd: add module param to dump all bo's

Srinivas Kandagatla (1):
  drm: msm: Add ASoC generic hdmi audio codec support.

Wei Yongjun (2):
  drm/msm/dsi: Fix return value check in msm_dsi_host_set_display_mode()
  drm/msm/hdmi: use PTR_ERR_OR_ZERO() to simplify the code

 .../devicetree/bindings/display/msm/dsi.txt| 117 +---
 .../devicetree/bindings/display/msm/mdp.txt|  59 
 .../devicetree/bindings/display/msm/mdp4.txt   | 112 +++
 .../devicetree/bindings/display/msm/mdp5.txt   | 160 ++
 drivers/gpu/drm/msm/Kconfig|   1 +
 drivers/gpu/drm/msm/Makefile   |   2 +
 drivers/gpu/drm/msm/adreno/adreno_gpu.c|  17 +-
 drivers/gpu/drm/msm/dsi/dsi.c   

[Bug 92936] Tonga powerplay isssues

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=92936

--- Comment #22 from Andy Furniss  ---
(In reply to Andy Furniss from comment #14)
> Been testing vce and there is an issue with auto.
> 
> This is not just this kernel, I've been back and now I have a script to test
> lots of runs, I can reproduce on older kernels + current fixes as well.
> 
> The issue is that it will hang, at this time I am apparently OK in that I
> can use desktop normally. There is no hung task timeout. If I kill the
> gstreamer process it won't return, then I may get a hung task trace.
> 
> Whether I kill gstreamer or not, quitting X or a VT switch will lock up
> display.
> 
> This only happens when
> /sys/class/drm/card0/device/power_dpm_force_performance_level is auto.
> 
> If it's high or low I can repeatedly run vce encodes OK - I have tested >
> 1000.
> 
> On this kernel and fixes it only takes < 5 runs to lock with the same test.
> 
> On an older kernel it lasted for 25 runs (which is I guess why I didn't hit
> it in "normal" testing + I often forced high for bench marking anyway)

With the latest tonga vce firmware + current agd5f drm-next kernels I can't
reproduce this anymore.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/d2f1ab6d/attachment.html>


[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, dead island, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

Daniel T.  changed:

   What|Removed |Added

Summary|HD6950 GPU lockup loop with |HD6950 GPU lockup loop with
   |various steam games |various steam games
   |(octodad, saints row 4, |(octodad, saints row 4,
   |grid autosport) |dead island, grid
   ||autosport)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/3100ce7b/attachment.html>


[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

2016-07-16 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=115321

--- Comment #14 from Peter Wu  ---
Ah... vga_switcheroo_ready() actually checks for clients.. makes sense.

As documented[1], the init handler is called when there is a dependence on
vga[_switcheroo] clients. Radeon however does not seem to need this, so the
initialization of functions is better done elsewhere. radeon_atpx_detect sounds
like an appropriate location.

 [1]:
https://www.kernel.org/doc/htmldocs/gpu/API-struct-vga-switcheroo-handler.html

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

2016-07-16 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=115321

--- Comment #13 from Christoph Haag  ---
This seems like a circular dependency.

if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl())
runtime = true;

vga_switcheroo_register_client(rdev->pdev, _switcheroo_ops,
runtime);

vga_switcheroo_register_client needs to know if runpm is enabled, but the
kernel only knows whether to enable runpm after vga_switcheroo_register_client
has caused radeon_atpx_init to be executed.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

2016-07-16 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=115321

--- Comment #12 from Christoph Haag  ---
First is the one radeon_atpx_init(); call that I added manually to
radeon_device_init in order to make it work:
[6.083965] CPU: 5 PID: 295 Comm: systemd-udevd Not tainted 4.6.0-mainline
#1
[6.083966] Hardware name: CLEVO P170EM/P170EM,
BIOS 4.6.5 08/22/2012
[6.083968]  0286 ab74fc8d 88007f8e7960
8131c6e8
[6.083970]  88080a2c4000 88080a2c5b80 88007f8e79a0
a093dc15
[6.083972]  81455aba 88080a2c4000 ab74fc8d
88080a2c4000
[6.083974] Call Trace:
[6.083978]  [] dump_stack+0x76/0x9e
[6.084014]  [] radeon_atpx_init+0x35/0x240 [radeon]
[6.084017]  [] ? vga_client_register+0x8a/0xa0
[6.084039]  [] radeon_device_init+0x875/0xcd0 [radeon]
[6.084060]  [] radeon_driver_load_kms+0xb0/0x230 [radeon]
[6.084066]  [] drm_dev_register+0xba/0xd0 [drm]
[6.084070]  [] drm_get_pci_dev+0xe1/0x1f0 [drm]
[6.084090]  [] radeon_pci_probe+0xc3/0xe0 [radeon]
[6.084092]  [] local_pci_probe+0x54/0xb0
[6.084094]  [] ? pci_match_device+0xf3/0x120
[6.084095]  [] pci_device_probe+0x118/0x170
[6.084098]  [] driver_probe_device+0x23f/0x450
[6.084100]  [] __driver_attach+0xe0/0x100
[6.084102]  [] ? driver_probe_device+0x450/0x450
[6.084103]  [] bus_for_each_dev+0x7b/0xc0
[6.084105]  [] driver_attach+0x31/0x40
[6.084107]  [] bus_add_driver+0x1d6/0x2a0
[6.084109]  [] driver_register+0x73/0xf0
[6.084110]  [] __pci_register_driver+0x5f/0x70
[6.084115]  [] drm_pci_init+0xef/0x120 [drm]
[6.084117]  [] ?
vga_switcheroo_register_handler+0x7d/0xa0
[6.084119]  [] ? 0xa09b5000
[6.084140]  [] radeon_init+0xab/0xc0 [radeon]
[6.084142]  [] do_one_initcall+0xc2/0x200
[6.084144]  [] ? __vunmap+0x98/0xe0
[6.084146]  [] ? vfree+0x41/0x80
[6.084149]  [] do_init_module+0x72/0x1f1
[6.084151]  [] load_module+0x2192/0x29c0
[6.084153]  [] ? symbol_put_addr+0x60/0x60
[6.084155]  [] ? __pte_alloc_kernel+0xbb/0x110
[6.084158]  [] SyS_init_module+0x162/0x1a0
[6.084160]  [] entry_SYSCALL_64_fastpath+0x1a/0xa4

Next there's a call that I did in printk() which I removed here because it's
the same as the next:

Next is radeon_device_init calling radeon_has_atpx_dgpu_power_cntl() and the
result would be used to disable runpm without the atpx init before:
[6.094760] CPU: 1 PID: 295 Comm: systemd-udevd Not tainted 4.6.0-mainline
#1
[6.094762] Hardware name: CLEVO P170EM/P170EM,
BIOS 4.6.5 08/22/2012
[6.094763]  0286 ab74fc8d 88007f8e7990
8131c6e8
[6.094766]  88080a2c4000 88080a2c5b80 88007f8e79a0
a093de71
[6.094767]  88007f8e79e0 a0845349 8800
880809dc5000
[6.094770] Call Trace:
[6.094774]  [] dump_stack+0x76/0x9e
[6.094808]  [] radeon_has_atpx_dgpu_power_cntl+0x21/0x30
[radeon]
[6.094829]  [] radeon_device_init+0xa19/0xcd0 [radeon]
[6.094849]  [] radeon_driver_load_kms+0xb0/0x230 [radeon]
[6.094855]  [] drm_dev_register+0xba/0xd0 [drm]
[6.094860]  [] drm_get_pci_dev+0xe1/0x1f0 [drm]
[6.094880]  [] radeon_pci_probe+0xc3/0xe0 [radeon]
[6.094882]  [] local_pci_probe+0x54/0xb0
[6.094884]  [] ? pci_match_device+0xf3/0x120
[6.094885]  [] pci_device_probe+0x118/0x170
[6.094888]  [] driver_probe_device+0x23f/0x450
[6.094890]  [] __driver_attach+0xe0/0x100
[6.094892]  [] ? driver_probe_device+0x450/0x450
[6.094893]  [] bus_for_each_dev+0x7b/0xc0
[6.094895]  [] driver_attach+0x31/0x40
[6.094897]  [] bus_add_driver+0x1d6/0x2a0
[6.094899]  [] driver_register+0x73/0xf0
[6.094900]  [] __pci_register_driver+0x5f/0x70
[6.094905]  [] drm_pci_init+0xef/0x120 [drm]
[6.094907]  [] ?
vga_switcheroo_register_handler+0x7d/0xa0
[6.094909]  [] ? 0xa09b5000
[6.094929]  [] radeon_init+0xab/0xc0 [radeon]
[6.094931]  [] do_one_initcall+0xc2/0x200
[6.094934]  [] ? __vunmap+0x98/0xe0
[6.094936]  [] ? vfree+0x41/0x80
[6.094938]  [] do_init_module+0x72/0x1f1
[6.094941]  [] load_module+0x2192/0x29c0
[6.094943]  [] ? symbol_put_addr+0x60/0x60
[6.094944]  [] ? __pte_alloc_kernel+0xbb/0x110
[6.094947]  [] SyS_init_module+0x162/0x1a0
[6.094951]  [] entry_SYSCALL_64_fastpath+0x1a/0xa4

And finally here is where the kernel inits the atpx stuff by default:
[6.096398] CPU: 1 PID: 295 Comm: systemd-udevd Not tainted 4.6.0-mainline
#1
[6.096400] Hardware name: CLEVO P170EM/P170EM,
BIOS 4.6.5 08/22/2012
[6.096401]  0286 ab74fc8d 88007f8e78e0
8131c6e8
[6.096406]  880809001700 0001 88007f8e7920
a093dc15
[6.096408]  88007f8e7900 ab74fc8d ab74fc8d
880809001700
[6.096411] Call Trace:

[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

--- Comment #15 from Daniel T.  ---
Okay I've updated to 12.0.1 and managed to get a trace of Octodad: Dadliest
Catch (Was a good starter because it always crashes consistently before the
main menu)

Here's the trace
https://drive.google.com/open?id=0Bzmfxv--_ou4NHIwU1ZNeURrRnc

In qapitrace the first call that causes a lockup is Frame 90; Call 30070

Various good calls:
26916
27306
28899
29045
29249
29980
30013
30055
30065
30067
30069 <-- last good

Various bad calls:
34530
31749
30200
30089
30075
30070 <-- first bad

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/486bc039/attachment.html>


[PATCH] drm/ttm: Remove create_singlethread_workqueue

2016-07-16 Thread Bhaktipriya Shridhar
swap_queue was created to handle shrinking in low memory situations.
A separate workqueue was used in order to avoid other workqueue tasks
from being blocked since work items on swap_queue spend a lot of time
waiting for the GPU.

Since these long-running work items aren't involved in memory reclaim in
any way, system_long_wq has been used.

Work item has been flushed in ttm_mem_global_release() to ensure that
nothing is pending when the driver is disconnected.

Signed-off-by: Bhaktipriya Shridhar 
---
 drivers/gpu/drm/ttm/ttm_memory.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
index a1803fb..b985482 100644
--- a/drivers/gpu/drm/ttm/ttm_memory.c
+++ b/drivers/gpu/drm/ttm/ttm_memory.c
@@ -366,7 +366,6 @@ int ttm_mem_global_init(struct ttm_mem_global *glob)
struct ttm_mem_zone *zone;

spin_lock_init(>lock);
-   glob->swap_queue = create_singlethread_workqueue("ttm_swap");
INIT_WORK(>work, ttm_shrink_work);
ret = kobject_init_and_add(
>kobj, _mem_glob_kobj_type, ttm_get_kobj(), 
"memory_accounting");
@@ -412,9 +411,7 @@ void ttm_mem_global_release(struct ttm_mem_global *glob)
ttm_page_alloc_fini();
ttm_dma_page_alloc_fini();

-   flush_workqueue(glob->swap_queue);
-   destroy_workqueue(glob->swap_queue);
-   glob->swap_queue = NULL;
+   flush_work(>work);
for (i = 0; i < glob->num_zones; ++i) {
zone = glob->zones[i];
kobject_del(>kobj);
@@ -443,7 +440,7 @@ static void ttm_check_swapping(struct ttm_mem_global *glob)
spin_unlock(>lock);

if (unlikely(needs_swapping))
-   (void)queue_work(glob->swap_queue, >work);
+   (void)queue_work(system_long_wq, >work);

 }

--
2.1.4



[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

2016-07-16 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=115321

--- Comment #11 from Peter Wu  ---
Can you put a dump_stack() in the atpx_init function and
radeon_has_atpx_dgpu_power_cntl functions such that we can see how it is
called?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[PATCH 12/16] gpu: ipu-v3: Fix CSI0 blur in NTSC format

2016-07-16 Thread Steve Longerbeam


On 07/15/2016 04:09 PM, Steve Longerbeam wrote:
>
>
> On 07/15/2016 05:58 AM, Philipp Zabel wrote:
>> Am Mittwoch, den 13.07.2016, 16:02 -0700 schrieb Steve Longerbeam:
>>> On 07/10/2016 09:33 AM, Steve Longerbeam wrote:

 On 07/08/2016 10:34 AM, Philipp Zabel wrote:
> Am Donnerstag, den 07.07.2016, 16:03 -0700 schrieb Steve Longerbeam:
>> From: Suresh Dhandapani 
>>
>> This patch will change the register IPU_CSI0_CCIR_CODE_2 value from
>> 0x40596 to 0x405A6. The change is related to the Start of field 1
>> first blanking line command bit[5-3] for NTSC format only. This
>> change is dependent with ADV chip where the NEWAVMODE is set to 0
>> in register 0x31. Setting NEWAVMODE to "0" in ADV means "EAV/SAV
>> codes generated to suit analog devices encoders".
>>
>> Signed-off-by: Suresh Dhandapani 
>> ---
>>drivers/gpu/ipu-v3/ipu-csi.c | 2 +-
>>1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/ipu-v3/ipu-csi.c 
>> b/drivers/gpu/ipu-v3/ipu-csi.c
>> index 0eac28c..ec81958 100644
>> --- a/drivers/gpu/ipu-v3/ipu-csi.c
>> +++ b/drivers/gpu/ipu-v3/ipu-csi.c
>> @@ -422,7 +422,7 @@ int ipu_csi_init_interface(struct ipu_csi *csi,
>>  ipu_csi_write(csi, 0xD07DF | CSI_CCIR_ERR_DET_EN,
>>  CSI_CCIR_CODE_1);
>> -ipu_csi_write(csi, 0x40596, CSI_CCIR_CODE_2);
>> +ipu_csi_write(csi, 0x405A6, CSI_CCIR_CODE_2);
>>ipu_csi_write(csi, 0xFF, CSI_CCIR_CODE_3);
>>} else {
>>dev_err(csi->ipu->dev,
> This looks like a very hardware specific hack? I'll at least have to
> test if that also works with other analog decoders.
 Hi Philipp,

 Yes it's a hack, but it has always been a hack (hardcoded values). 
 And the
 reason is simple, nobody AFAIK (including me) understands how to 
 program
 these CSI_CCIR_CODE registers, the description in the reference 
 manual is
 complete gibberish.
>>> Hi Philipp, Ian over at linux-media helped me to understand these 
>>> registers a
>>> little better, although there are still mysteries given the poor 
>>> documentation.
>>> You should have been copied on that linux-media thread.
>>>
 The reason we made this change is that, in discussions with Analog 
 Devices,
 they recommended setting NEWAVMODE, which changes the positions of
 the AV codes sent by the ADV7180 on the bt.656 bus. It took Suresh 
 at least
 a full day of reverse engineering (Suresh correct me if I am wrong) 
 to hit
 on the correct values in these registers to regain stable video 
 after switching
 the ADV7180 to NEWAVMODE.
>>> So this NEWAVMODE is somehow breaking from the BT.656 standard, which
>>> necessitated the change to CSI_CCIR_CODE_2. So NEWAVMODE if enabled in
>>> the ADV7180 will break other capture backends that are expecting 
>>> standard
>>> BT.656 SAV/EAV codes. So NEWAVMODE should not be used and I will remove
>>> this patch in the next version.
>> Ok. To use that mode, first a new v4l2 mbus type and corresponding DT
>> bindings would have to be added.
>
> Hmm, do you mean define something like a V4L2_MBUS_BT656_NEWAVMODE,
> and then add a new "newavmode" boolean DT binding parsed by
> v4l2_of_parse_endpoint()?
>
> I don't know if that would make sense given that this NEWAVMODE is a kind
> of hack of the BT.656 standard, only used by Analog Devices 
> encoders/decoders.
>
> Although there a _lot_ of AD encoder/decoder chips (and subdev drivers 
> written for
> them), so maybe it would make sense to do this.
>

I don't think a "newavmode" boolean property would necessitate a whole new
mbus type, but perhaps just a new parallel bus flag. I will propose a 
patch at
linux-media that adds this.

Steve



[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

2016-07-16 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=115321

--- Comment #10 from Christoph Haag  ---
Well, it does not help. I wanted to get you some more info, so I inserted some
printks:

in radeon_atpx_handler.c
static void radeon_atpx_parse_functions(struct radeon_atpx_functions *f, u32
mask)
{
printk(KERN_ERR "ATPX mask: %u\n", mask);
printk(KERN_ERR "ATPX power control supported: %u\n",
ATPX_POWER_CONTROL_SUPPORTED);
printk(KERN_ERR "mask & ATPX_POWER_CONTROL_SUPPORTED: %u\n", mask &
ATPX_POWER_CONTROL_SUPPORTED);
printk(KERN_ERR "!!(mask & ATPX_POWER_CONTROL_SUPPORTED): %u\n",
!!(mask & ATPX_POWER_CONTROL_SUPPORTED));

in radeon_device.c
printk(KERN_ERR "rdev->flags: %u\n", rdev->flags);
printk(KERN_ERR "rdev->flags & RADEON_IS_PX: %u\n", rdev->flags &
RADEON_IS_PX);
printk(KERN_ERR "radeon_has_atpx_dgpu_power_cntl(): %u\n",
radeon_has_atpx_dgpu_power_cntl());
if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl())
runtime = true;

Then I booted and got this:

[6.235984] rdev->flags: 39911477
[6.238221] rdev->flags & RADEON_IS_PX: 33554432
[6.239947] radeon_has_atpx_dgpu_power_cntl(): 0
[6.241572] vga_switcheroo: enabled
[6.241657] ATPX version 1, functions 0x0033
[6.241659] ATPX mask: 51
[6.243153] ATPX power control supported: 2
[6.244508] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[6.245649] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1

Uhm... so, does that mean the ATPX BIOS version has been fine in the first
place and that radeon_has_atpx_dgpu_power_cntl() returns 0, just because the
check whether to enable runpm is done BEFORE the atpx stuff is even parsed?

I didn't want to trace everything back to the inits, so I just put another
radeon_atpx_init(); call just before the runpm check, removed static from the
function and added a forward declaration
int radeon_atpx_init(void);
...
radeon_atpx_init();
printk(KERN_ERR "rdev->flags: %u\n", rdev->flags);
printk(KERN_ERR "rdev->flags & RADEON_IS_PX: %u\n", rdev->flags &
RADEON_IS_PX);
printk(KERN_ERR "radeon_has_atpx_dgpu_power_cntl(): %u\n",
radeon_has_atpx_dgpu_power_cntl());
if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl()) {
runtime = true;
printk(KERN_ERR "runpm is enabled. Yay\n");
}

And I got
[6.223693] ATPX mask: 51
[6.224823] ATPX power control supported: 2
[6.225937] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[6.227140] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1
[6.228198] rdev->flags: 39911477
[6.229274] rdev->flags & RADEON_IS_PX: 33554432
[6.230181] radeon_has_atpx_dgpu_power_cntl(): 1
[6.231039] runpm is enabled. Yay
[6.231889] vga_switcheroo: enabled
[6.231956] ATPX version 1, functions 0x0033
[6.231957] ATPX mask: 51
[6.232267] usbcore: registered new interface driver btusb
[6.232932] ATPX power control supported: 2
[6.233849] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[6.234717] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1

YES! IT DOES!

Damn!
Thank you so much for asking a follow up question so I can stop telling people
that the BIOS on several laptops is broken and looking like an idiot.

On the other side: It probably would have been a good idea to verify that there
IS hardware where it actually works as intended before declaring the BIOS to be
at fault.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[Bug 96860] Aliasing when using vdpau with mpv

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=96860

--- Comment #4 from Łukasz Żarnowiecki  ---
I tested mesa 12.0.1 and the problem is fixed.  Affected version is 11.2.2. 
Should I close this one?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/cea09f16/attachment.html>


[Bug 96956] amdgpu disables fan by default and burns HW

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=96956

Bug ID: 96956
   Summary: amdgpu disables fan by default and burns HW
   Product: DRI
   Version: unspecified
  Hardware: All
OS: Linux (All)
Status: NEW
  Severity: critical
  Priority: medium
 Component: DRM/AMDgpu
  Assignee: dri-devel at lists.freedesktop.org
  Reporter: stsp at list.ru

I have radeon R9 380.
After the KMS driver activates, the fans on
the GPU stops. They can be activated again by
properly setting up fancontrol, but this wasn't
configured on my PC. As the result, for the last
few years I have replaced many motherboards, all
starting to have bad capacitors around the video
card. But only now I have noticed that the fans
are not rotating... :(

The driver should activate fans by default, or
don't touch the initial settings (fans are rotating
before linux have started), but not stop them by default.

Bug reports for the reference:
https://bugzilla.kernel.org/show_bug.cgi?id=119211
https://bugzilla.redhat.com/show_bug.cgi?id=1340949

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/3dc93cc3/attachment.html>


[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

--- Comment #14 from iive at yahoo.com ---
@Daniel T.
FYI 12.1 would be the next release. The first bugfix release 12.0.1 is already
out (fixes compilation with debugging).
The shader backend is very specific to r600 cards and very few people even
touch it. So there is no way this bugs gets fixed by accident.

@eydee,
Are you using environment variables for the override in drirc file?
`
export MESA_GL_VERSION_OVERRIDE=4.1
export MESA_GLSL_VERSION_OVERRIDE=410
`
should set override for any programs started from this bash session onward.

If you prefer drirc override, then have in mind that `glretrace` is the program
that does the actual playback/replay.

If you upload a trace I could try to narrow it down, but my card also needs the
override.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/abc19a7c/attachment-0001.html>


[PATCH v4.1 3/4] drm/bridge: analogix_dp: add the PSR function support

2016-07-16 Thread Yakir Yang
Sean,

On 07/15/2016 09:13 PM, Sean Paul wrote:
> On Fri, Jul 15, 2016 at 06:55:17PM +0800, Yakir Yang wrote:
>> The full name of PSR is Panel Self Refresh, panel device could refresh
>> itself with the hardware framebuffer in panel, this would make lots of
>> sense to save the power consumption.
>>
>> This patch have exported two symbols for platform driver to implement
>> the PSR function in hardware side:
>> - analogix_dp_active_psr()
>> - analogix_dp_inactive_psr()
>>
>> Signed-off-by: Yakir Yang 
> Reviewed-by: Sean Paul 

Thanks for your reviewed  :-D

- Yakir

>
>> ---
>> Changes in v4.1:
>> - Take use of existing edp_psr_vsc struct to swap HBx and DBx setting. (Sean)
>> - Remove PSR_VID_CRC_FLUSH setting analogix_dp_enable_psr_crc().
>> - Add comment about PBx magic numbers. (Sean)
>>
>> Changes in v4:
>> - Downgrade the PSR version print message to debug level. (Sean)
>> - Return 'void' instead of 'int' in analogix_dp_enable_sink_psr(). (Sean)
>> - Delete the unused read dpcd operations in analogix_dp_enable_sink_psr(). 
>> (Sean)
>> - Delete the arbitrary usleep_range in analogix_dp_enable_psr_crc. (Sean).
>> - Clean up the hardcoded values in analogix_dp_send_psr_spd(). (Sean)
>> - Rename "active/inactive" to "enable/disable". (Sean, Dominik)
>> - Keep set the PSR_VID_CRC_FLUSH gate in analogix_dp_enable_psr_crc().
>>
>> Changes in v3:
>> - split analogix_dp_enable_psr(), make it more clearly
>>  analogix_dp_detect_sink_psr()
>>  analogix_dp_enable_sink_psr()
>> - remove some nosie register setting comments
>>
>> Changes in v2:
>> - introduce in v2, splite the common Analogix DP changes out
>>
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 81 
>> ++
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.h |  5 ++
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c  | 51 ++
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.h  | 34 +
>>   include/drm/bridge/analogix_dp.h   |  3 +
>>   5 files changed, 174 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c 
>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> index 32715da..381b25e 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -97,6 +97,83 @@ static int analogix_dp_detect_hpd(struct 
>> analogix_dp_device *dp)
>>  return 0;
>>   }
>>   
>> +int analogix_dp_enable_psr(struct device *dev)
>> +{
>> +struct analogix_dp_device *dp = dev_get_drvdata(dev);
>> +struct edp_vsc_psr psr_vsc;
>> +
>> +if (!dp->psr_support)
>> +return -EINVAL;
>> +
>> +/* Prepare VSC packet as per EDP 1.4 spec, Table 6.9 */
>> +memset(_vsc, 0, sizeof(psr_vsc));
>> +psr_vsc.sdp_header.HB0 = 0;
>> +psr_vsc.sdp_header.HB1 = 0x7;
>> +psr_vsc.sdp_header.HB2 = 0x2;
>> +psr_vsc.sdp_header.HB3 = 0x8;
>> +
>> +psr_vsc.DB0 = 0;
>> +psr_vsc.DB1 = EDP_VSC_PSR_STATE_ACTIVE | EDP_VSC_PSR_CRC_VALUES_VALID;
>> +
>> +analogix_dp_send_psr_spd(dp, _vsc);
>> +return 0;
>> +}
>> +EXPORT_SYMBOL_GPL(analogix_dp_enable_psr);
>> +
>> +int analogix_dp_disable_psr(struct device *dev)
>> +{
>> +struct analogix_dp_device *dp = dev_get_drvdata(dev);
>> +struct edp_vsc_psr psr_vsc;
>> +
>> +if (!dp->psr_support)
>> +return -EINVAL;
>> +
>> +/* Prepare VSC packet as per EDP 1.4 spec, Table 6.9 */
>> +memset(_vsc, 0, sizeof(psr_vsc));
>> +psr_vsc.sdp_header.HB0 = 0;
>> +psr_vsc.sdp_header.HB1 = 0x7;
>> +psr_vsc.sdp_header.HB2 = 0x2;
>> +psr_vsc.sdp_header.HB3 = 0x8;
>> +
>> +psr_vsc.DB0 = 0;
>> +psr_vsc.DB1 = 0;
>> +
>> +analogix_dp_send_psr_spd(dp, _vsc);
>> +return 0;
>> +}
>> +EXPORT_SYMBOL_GPL(analogix_dp_disable_psr);
>> +
>> +static bool analogix_dp_detect_sink_psr(struct analogix_dp_device *dp)
>> +{
>> +unsigned char psr_version;
>> +
>> +analogix_dp_read_byte_from_dpcd(dp, DP_PSR_SUPPORT, _version);
>> +dev_dbg(dp->dev, "Panel PSR version : %x\n", psr_version);
>> +
>> +return (psr_version & DP_PSR_IS_SUPPORTED) ? true : false;
>> +}
>> +
>> +static void analogix_dp_enable_sink_psr(struct analogix_dp_device *dp)
>> +{
>> +unsigned char psr_en;
>> +
>> +/* Disable psr function */
>> +analogix_dp_read_byte_from_dpcd(dp, DP_PSR_EN_CFG, _en);
>> +psr_en &= ~DP_PSR_ENABLE;
>> +analogix_dp_write_byte_to_dpcd(dp, DP_PSR_EN_CFG, psr_en);
>> +
>> +/* Main-Link transmitter remains active during PSR active states */
>> +psr_en = DP_PSR_MAIN_LINK_ACTIVE | DP_PSR_CRC_VERIFICATION;
>> +analogix_dp_write_byte_to_dpcd(dp, DP_PSR_EN_CFG, psr_en);
>> +
>> +/* Enable psr function */
>> +psr_en = DP_PSR_ENABLE | DP_PSR_MAIN_LINK_ACTIVE |
>> + DP_PSR_CRC_VERIFICATION;
>> +analogix_dp_write_byte_to_dpcd(dp, DP_PSR_EN_CFG, psr_en);
>> +
>> +analogix_dp_enable_psr_crc(dp);
>> +}
>> +
>>   static unsigned char 

[PATCH v4.1 1/4] drm/rockchip: vop: export line flag function

2016-07-16 Thread Yakir Yang
Sean,

On 07/15/2016 09:04 PM, Sean Paul wrote:
> On Fri, Jul 15, 2016 at 6:55 AM, Yakir Yang  wrote:
>> VOP have integrated a hardware counter which indicate the exact display
>> line that vop is scanning. And if we're interested in a specific line,
>> we can set the line number to vop line_flag register, and then vop would
>> generate a line_flag interrupt for it.
>>
>> For example eDP PSR function is interested in the vertical blanking
>> period, then driver could set the line number to zero.
>>
>> This patch have exported a symbol that allow other driver to listen the
>> line flag event with given timeout limit:
>> -  rockchip_drm_wait_line_flag()
>>
>> Signed-off-by: Yakir Yang 
>
> Thanks for the update.
>
> Reviewed-by: Sean Paul 

Thanks for your reviewed  :-D

- Yakir

>> ---
>> Changes in v4.1:
>> - Remove the completion_done() check in irq handler (Sean)
>>
>> Changes in v4:
>> - Avoid the weird behavior in rockchip_drm_wait_line_flag(). (Sean)
>> - Make line_flag_num_x to an array. (Sean)
>> - Remove the unused vop_cfg_done() in vop_line_flag_irq_enable(). (Stephane, 
>> reviewed in Google gerrit)
>>  
>> [https://chromium-review.googlesource.com/#/c/349084/33/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>>  at 466]
>>
>> Changes in v3:
>> - Export the 'rockchip_drm_wait_line_flag' symbol, and document it.
>> - Add 'line_flag_num_0' for RK3288/RK3036
>> - Remove the notify for waiting line_flag event (Daniel)
>>
>> Changes in v2:
>> - Introduce in v2, split VOP line flag changes out
>>
>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.h |   3 +
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 117 
>> 
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.h |   2 +
>>   drivers/gpu/drm/rockchip/rockchip_vop_reg.c |   4 +
>>   4 files changed, 126 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h 
>> b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> index ea39329..239b830 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
>> @@ -70,4 +70,7 @@ int rockchip_drm_dma_attach_device(struct drm_device 
>> *drm_dev,
>> struct device *dev);
>>   void rockchip_drm_dma_detach_device(struct drm_device *drm_dev,
>>  struct device *dev);
>> +int rockchip_drm_wait_line_flag(struct drm_crtc *crtc, unsigned int 
>> line_num,
>> +   unsigned int mstimeout);
>> +
>>   #endif /* _ROCKCHIP_DRM_DRV_H_ */
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c 
>> b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> index c8a62a8..8a4f36e 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> @@ -121,6 +121,8 @@ struct vop {
>>  /* protected by dev->event_lock */
>>  struct drm_pending_vblank_event *event;
>>
>> +   struct completion line_flag_completion;
>> +
>>  const struct vop_data *data;
>>
>>  uint32_t *regsbak;
>> @@ -431,6 +433,71 @@ static void vop_dsp_hold_valid_irq_disable(struct vop 
>> *vop)
>>  spin_unlock_irqrestore(>irq_lock, flags);
>>   }
>>
>> +/*
>> + * (1) each frame starts at the start of the Vsync pulse which is signaled 
>> by
>> + * the "FRAME_SYNC" interrupt.
>> + * (2) the active data region of each frame ends at dsp_vact_end
>> + * (3) we should program this same number (dsp_vact_end) into 
>> dsp_line_frag_num,
>> + *  to get "LINE_FLAG" interrupt at the end of the active on screen 
>> data.
>> + *
>> + * VOP_INTR_CTRL0.dsp_line_frag_num = VOP_DSP_VACT_ST_END.dsp_vact_end
>> + * Interrupts
>> + * LINE_FLAG ---+
>> + * FRAME_SYNC + |
>> + *| |
>> + *v v
>> + *| Vsync | Vbp |  Vactive  | Vfp |
>> + *^ ^   ^ ^
>> + *| |   | |
>> + *| |   | |
>> + * dsp_vs_end + |   | |   VOP_DSP_VTOTAL_VS_END
>> + * dsp_vact_start --+   | |   VOP_DSP_VACT_ST_END
>> + * dsp_vact_end + |   VOP_DSP_VACT_ST_END
>> + * dsp_total -+   VOP_DSP_VTOTAL_VS_END
>> + */
>> +static bool vop_line_flag_irq_is_enabled(struct vop *vop)
>> +{
>> +   uint32_t line_flag_irq;
>> +   unsigned long flags;
>> +
>> +   spin_lock_irqsave(>irq_lock, flags);
>> +
>> +   line_flag_irq = VOP_INTR_GET_TYPE(vop, enable, LINE_FLAG_INTR);
>> +
>> +   spin_unlock_irqrestore(>irq_lock, flags);
>> +
>> +   return !!line_flag_irq;
>> +}
>> +
>> +static void vop_line_flag_irq_enable(struct vop *vop, int line_num)
>> +{
>> +   unsigned long flags;
>> +
>> +   if (WARN_ON(!vop->is_enabled))
>> +   

[PATCH] drm/ast: Delete an unnecessary check before drm_gem_object_unreference_unlocked()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 09:54:22 +0200

The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/ast/ast_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 7bc3aa6..904beaa 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -295,9 +295,8 @@ static int ast_get_dram_info(struct drm_device *dev)
 static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb)
 {
struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb);
-   if (ast_fb->obj)
-   drm_gem_object_unreference_unlocked(ast_fb->obj);

+   drm_gem_object_unreference_unlocked(ast_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(fb);
 }
-- 
2.9.1



[PATCH] drm/hdlcd: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 09:10:40 +0200

The drm_fbdev_cma_hotplug_event() function tests whether its argument
is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/arm/hdlcd_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 28b8cd1..9b1aefe 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -102,8 +102,7 @@ static void hdlcd_fb_output_poll_changed(struct drm_device 
*drm)
 {
struct hdlcd_drm_private *hdlcd = drm->dev_private;

-   if (hdlcd->fbdev)
-   drm_fbdev_cma_hotplug_event(hdlcd->fbdev);
+   drm_fbdev_cma_hotplug_event(hdlcd->fbdev);
 }

 static const struct drm_mode_config_funcs hdlcd_mode_config_funcs = {
-- 
2.9.1



[PATCH v1 4/6] drm/rockchip: dw_hdmi: add RK3399 HDMI support

2016-07-16 Thread Rob Herring
On Mon, Jul 11, 2016 at 07:05:46PM +0800, Yakir Yang wrote:
> RK3399 and RK3288 shared the same HDMI IP controller, only some light
> difference with GRF configure.
> 
> Signed-off-by: Yakir Yang 
> ---
>  .../devicetree/bindings/display/bridge/dw_hdmi.txt |  1 +
>  .../bindings/display/rockchip/dw_hdmi-rockchip.txt |  3 +-

Acked-by: Rob Herring 

>  drivers/gpu/drm/bridge/dw-hdmi.c   |  2 +-
>  drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c| 45 
> ++
>  include/drm/bridge/dw_hdmi.h   |  6 +++
>  5 files changed, 48 insertions(+), 9 deletions(-)


[PATCH] drm/cirrus: Delete an unnecessary check before drm_gem_object_unreference_unlocked()

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 08:28:13 +0200

The drm_gem_object_unreference_unlocked() function tests whether
its argument is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/cirrus/cirrus_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c 
b/drivers/gpu/drm/cirrus/cirrus_main.c
index 32d32c5..80446e2 100644
--- a/drivers/gpu/drm/cirrus/cirrus_main.c
+++ b/drivers/gpu/drm/cirrus/cirrus_main.c
@@ -17,8 +17,8 @@
 static void cirrus_user_framebuffer_destroy(struct drm_framebuffer *fb)
 {
struct cirrus_framebuffer *cirrus_fb = to_cirrus_framebuffer(fb);
-   if (cirrus_fb->obj)
-   drm_gem_object_unreference_unlocked(cirrus_fb->obj);
+
+   drm_gem_object_unreference_unlocked(cirrus_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(fb);
 }
-- 
2.9.1



[PATCH] drm/tegra: Delete an unnecessary check before the function call "vunmap"

2016-07-16 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 16 Jul 2016 07:23:42 +0200

The vunmap() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/gpu/drm/tegra/fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 1b12aa7..e6d71fa 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -68,7 +68,7 @@ static void tegra_fb_destroy(struct drm_framebuffer 
*framebuffer)
struct tegra_bo *bo = fb->planes[i];

if (bo) {
-   if (bo->pages && bo->vaddr)
+   if (bo->pages)
vunmap(bo->vaddr);

drm_gem_object_unreference_unlocked(>gem);
-- 
2.9.1



[PATCH 2/2] drm/amd/powerplay: Delete unused functions in ppevvmath.h

2016-07-16 Thread Nils Wallménius
; -
> >>> >  /*
> >>> >
> -
> >>> >   * TROUBLESHOOTING INFORMATION
> >>> >   *
> >>> >
> -
> >>> > @@ -498,51 +488,12 @@ static void SolveQuadracticEqn(fInt A, fInt B,
> >>> > fInt C, fInt Roots[])
> >>> >   *
> >>> >
> -
> >>> >   */
> >>> >
> >>> > -/* Addition using two normal ints - Temporary - Use only for testing
> >>> > purposes?. */
> >>> > -static fInt Add (int X, int Y)
> >>> > -{
> >>> > -   fInt A, B, Sum;
> >>> > -
> >>> > -   A.full = (X << SHIFT_AMOUNT);
> >>> > -   B.full = (Y << SHIFT_AMOUNT);
> >>> > -
> >>> > -   Sum.full = A.full + B.full;
> >>> > -
> >>> > -   return Sum;
> >>> > -}
> >>> > -
> >>> >  /* Conversion Functions */
> >>> >  static int GetReal (fInt A)
> >>> >  {
> >>> > return (A.full >> SHIFT_AMOUNT);
> >>> >  }
> >>> >
> >>> > -/* Temporarily Disabled */
> >>> > -static int GetRoundedValue(fInt A) /*For now, round the 3rd decimal
> >>> > place */
> >>> > -{
> >>> > -   /* ROUNDING TEMPORARLY DISABLED
> >>> > -   int temp = A.full;
> >>> > -   int decimal_cutoff, decimal_mask = 0x01FF;
> >>> > -   decimal_cutoff = temp & decimal_mask;
> >>> > -   if (decimal_cutoff > 0x147) {
> >>> > -   temp += 673;
> >>> > -   }*/
> >>> > -
> >>> > -   return ConvertBackToInteger(A)/1; /*Temporary - in case
> >>> > this was used somewhere else */
> >>> > -}
> >>> > -
> >>> > -static fInt Multiply (int X, int Y)
> >>> > -{
> >>> > -   fInt A, B, Product;
> >>> > -
> >>> > -   A.full = X << SHIFT_AMOUNT;
> >>> > -   B.full = Y << SHIFT_AMOUNT;
> >>> > -
> >>> > -   Product = fMultiply(A, B);
> >>> > -
> >>> > -   return Product;
> >>> > -}
> >>> > -
> >>> >  static fInt Divide (int X, int Y)
> >>> >  {
> >>> > fInt A, B, Quotient;
> >>> > @@ -578,14 +529,6 @@ static int uPow(int base, int power)
> >>> > return (base)*uPow(base, power - 1);
> >>> >  }
> >>> >
> >>> > -static fInt fAbs(fInt A)
> >>> > -{
> >>> > -   if (A.partial.real < 0)
> >>> > -   return (fMultiply(A, ConvertToFraction(-1)));
> >>> > -   else
> >>> > -   return A;
> >>> > -}
> >>> > -
> >>> >  static int uAbs(int X)
> >>> >  {
> >>> > if (X < 0)
> >>> > --
> >>> > 2.8.0.rc3
> >>> >
> >>> > ___
> >>> > dri-devel mailing list
> >>> > dri-devel at lists.freedesktop.org
> >>> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >>
> >>
> >
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/bf3ea088/attachment-0001.html>


[Bug 94900] HD6950 GPU lockup loop with various steam games (octodad, saints row 4, grid autosport)

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=94900

--- Comment #13 from eydee  ---
Adding some info, I have very similar GPU crashes (including kernel log) on
6850 BARTS using any recent (11.x, 12.x) Mesa version up until latest git.

The GPU lockup and crash happens in Bioshock Infinite, right after the intro
logos and before reaching the title screen. It is not random, there's no way to
start the game at all without touching Mesa configuration. However, launching
with R600_DEBUG=nosb makes the game start up perfectly. Everything works, no
visual glitches either, only performance is lower than expected, possibly
because of the lack of shader optimization.

I can do an apitrace if needed, but can't replay and analyze it, as apitrace
can't replay on forced OpenGL context. (BARTS only exposes 3.3, overriding is
required to start the game.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/ae255e14/attachment.html>


[Nouveau] [PATCH v3 0/4] nouveau RPM fixes for Optimus (final)

2016-07-16 Thread Peter Wu
Notebook_PC
01:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 740M] 
[10de:1292] (rev a1)
(No audio device found)
Date: bios-release-date : 11/20/2014
Got _PR3!

105 ASUSTeK_COMPUTER_INC.-UX303LNB
03:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 840M] 
[10de:1341] (rev a2)
(No audio device found)
Date: bios-release-date : 12/10/2014
Got _PR3!

106 Micro-Star_International_Co.,_Ltd.-GS70_2PC_Stealth
01:00.0 3D controller [0302]: NVIDIA Corporation GK104M [GeForce GTX 860M] 
[10de:119a] (rev ff) (prog-if ff)
(No audio device found)
Date: bios-release-date : 01/13/2015
Got _PR3!

107 Hewlett-Packard-HP_ZBook_15
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208GLM [Quadro 
K610M] [10de:12b9] (rev a1) (prog-if 00 [VGA controller])
01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller 
[10de:0e0f] (rev a1)
Date: bios-release-date : 03/31/2015
Use _DSM!

108 CLEVO-P65xSE-A
01:00.0 3D controller [0302]: NVIDIA Corporation Device [10de:13d8] (rev ff) 
(prog-if ff)
(No audio device found)
Date: bios-release-date : 10/12/2015
Got _PR3!

109 ASUSTeK_COMPUTER_INC.-G501JW
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] 
[10de:139b] (rev ff) (prog-if ff)
(No audio device found)
Date: bios-release-date : 10/28/2015
Got _PR3!

110 Notebook-P65_P67RGRERA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204M [GeForce 
GTX 970M] [10de:13d8] (rev a1) (prog-if 00 [VGA controller])
(No audio device found)
Date: bios-release-date : 12/21/2015
Got _PR3!

111 Notebook-N15_17RD
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107M [GeForce 
GTX 960M] [10de:139b] (rev a2) (prog-if 00 [VGA controller])
(No audio device found)
Date: bios-release-date : 12/25/2015
Got _PR3!

-- next part --
#!/usr/bin/gawk -f
# Example usage to download the files, preserving time and following redirs:
# curl -o 752542.html https://bugs.launchpad.net/lpbugreporter/+bug/752542 &&
# ./get-urls.awk 752542.html |
# awk 'NR<=50{print "-O", $0}' | (cd /tmp/lp/dl/ && time xargs curl -qvRL)
BEGIN {
FS="\""
delete entries
}
/portlet-attachments/ { p = 1}
# The few .zip and .tar and .tar.bz2 did not seem interesting. Also ignore plain
# .dsl{,.gz,.bz2}, .txt and .dat files.
p && /+files\/.*\.tar\.gz"/ {
url = $2
split(url, parts, "/")
name = parts[10]
id = parts[8]

#print url;
# Overwrite older names with newer submissions.
entries[name] = url
ids[id] = name
}

END {
# Sort by attachment ID
asorti(ids, ids_sorted)
# Print attachments in reverse (newest first)
for (i = length(ids_sorted); i > 0; i--) {
id = ids_sorted[i]
name = ids[id]
if (entries[name]) {
url = entries[name]
print url
# Do not print duplicates
delete entries[name]
}
}
}
-- next part --
A non-text attachment was scrubbed...
Name: has-audio-problem.sh
Type: application/x-sh
Size: 1994 bytes
Desc: not available
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/55b1e1fa/attachment-0001.sh>


[Bug 90595] [drm:si_dpm_set_power_state [radeon]] *ERROR* si_set_sw_state failed

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=90595

--- Comment #10 from JATothrim  ---
Created attachment 125097
  --> https://bugs.freedesktop.org/attachment.cgi?id=125097=edit
lspci -vvv kernel 4.6.x

Added lspci -vvv ouput.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/79c5c2ce/attachment.html>


[Bug 90595] [drm:si_dpm_set_power_state [radeon]] *ERROR* si_set_sw_state failed

2016-07-16 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=90595

JATothrim  changed:

   What|Removed |Added

   Severity|normal  |major

--- Comment #9 from JATothrim  ---
Apparently after several kernel versions later hibernate is still broken on my
machine. :(

uname -a: Linux HyperArchMachine 4.6.3-1-ARCH #1 SMP PREEMPT Fri Jun 24
21:19:13 CEST 2016 x86_64 GNU/Linux
Operating system is Arch/Antergos.

Sympthoms:
-No panic is displayed. The machine freezes completly soon as radeon tries to
hibernate (to swap disk 8GiB). No way to soft reset.
-On resuming first display VTs are showing up weird: resolution is same as
second display (1680x1050) but parts beyond that reso of the FullHD display are
corrupted (pink pixel noise).
-[drm:si_dpm_set_power_state [radeon]] *ERROR* si_set_sw_state failed gets
outputed on suspend/resume.

Disabling DPM on boot allows machine to hibernate/resume correctly but dual
display VT weirdness persists.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://lists.freedesktop.org/archives/dri-devel/attachments/20160716/d44e8878/attachment.html>