[Intel-gfx] [Regression report] Weekly regression report WW05

2016-01-31 Thread jairo . daniel . miramontes . caton

WW05 Regression report.

There was no new regressions Last week.

Previous Regressions
+---+---+-++
| BugId | Summary   | Created on  | 
Bisect |
+---+---+-++
| 93802 | [IVB bisected] switching to tty1 causes fifo  | 2016-01-20 20:48:09 | 
Yes|
| 93698 | [BAT BYT regression] WARNING Unclaimed regist | 2016-01-13 13:29:56 | 
No |
| 93640 | [BAT ILK SNB IVB bisected] Fifo underruns sin | 2016-01-08 08:43:33 | 
Yes|
| 93608 | bisected: i915 SNB modeset crash in ac9b82365 | 2016-01-06 15:40:51 | 
Yes|
| 93509 | [SNB] [4.4 regression] vblank wait timed out  | 2015-12-26 10:54:43 | 
No |
| 93393 | Regression for Skylake modesetting in kernel  | 2015-12-16 07:27:52 | 
No |
| 93263 | 945GM regression since 4.3| 2015-12-05 17:55:50 | 
No |
| 93122 | [SNB BAT IGT regression] pm_rpm started skipp | 2015-11-26 13:35:39 | 
No |
| 92972 | Black screen on Intel NUC hardware (i915) pos | 2015-11-16 21:54:43 | 
No |
| 92718 | [REGRESSION] 4.3.0-rc7 - Multiple identical k | 2015-10-29 01:23:04 | 
No |
| 92655 | [i915] LVDS screen half garbled. unable to bi | 2015-10-23 20:42:24 | 
Yes|
| 92575 | [4.2 regression] Massive graphics corruption  | 2015-10-21 17:27:09 | 
No |
| 92502 | [SKL] [Regression] igt/kms_flip/2x-flip-vs-ex | 2015-10-16 15:44:30 | 
No |
| 92414 | [Intel-gfx] As of kernel 4.3-rc1 system will  | 2015-10-10 17:26:57 | 
Yes|
| 92237 | Horrible noise (audio) via DisplayPort [regre | 2015-10-02 09:07:52 | 
No |
| 92096 | regression/bug introduced by commit [0e572fe7 | 2015-09-24 02:07:37 | 
No |
| 92083 | [regression] [git pull] drm for 4.3   | 2015-09-23 03:31:34 | 
No |
| 92050 | [regression]/bug introduced by commit [0e572f | 2015-09-19 19:12:23 | 
No |
| 91974 | [bisected] unrecoverable black screen after k | 2015-09-11 09:33:35 | 
Yes|
| 91959 | [865g 3.19 regression] Desktop image is disto | 2015-09-10 13:32:37 | 
No |
| 91952 | [Bisected Regression] Blank screen from boot  | 2015-09-10 01:24:00 | 
Yes|
| 91844 | [HSW Regression] intel_do_flush_locked failed | 2015-09-02 00:06:09 | 
No |
| 91378 | [hsw dp regression] 06ea66b6 (5.4GHz link clo | 2015-07-17 21:55:21 | 
No |
| 90994 | [BDW regression] pm_rpm subtests fail and giv | 2015-06-16 18:30:52 | 
No |
| 90808 | [BDW Bisected]igt/gem_ctx_param_basic/invalid | 2015-06-02 03:07:02 | 
Yes|
| 90732 | [BDW/BSW Bisected]igt/gem_reloc_vs_gpu/forked | 2015-05-29 02:19:26 | 
Yes|
| 90368 | [SNB BSW SKL] bisected igt/kms_3d has hardcod | 2015-05-08 07:28:55 | 
Yes|
| 90134 | [BSW Bisected]GFXBench3_gl_driver/GFXBench3_g | 2015-04-22 05:07:28 | 
Yes|
| 90112 | [BSW bisected] OglGSCloth/Lightsmark/CS/ Port | 2015-04-20 07:25:42 | 
Yes|
| 89872 | [ HSW Bisected ] VGA was white screen when re | 2015-04-02 11:30:59 | 
Yes|
| 89728 | [HSW/BDW/BSW/BYT bisected] igt / pm_rps / res | 2015-03-23 10:01:57 | 
Yes|
| 89632 | [i965 regression]igt/kms_universal_plane/univ | 2015-03-18 06:45:02 | 
No |
| 89629 | [i965 regression]igt/kms_rotation_crc/sprite- | 2015-03-18 06:10:53 | 
No |
| 89334 | [945 regression] 4.0-rc1 kernel GPU hang:  ec | 2015-02-26 08:05:08 | 
No |
| 88439 | [BDW Bisected]igt/gem_reloc_vs_gpu/forked-fau | 2015-01-15 06:02:18 | 
Yes|
| 88124 | i915: regression: after DP connected monitor  | 2015-01-06 18:39:51 | 
No |
| 87726 | [BDW Bisected] OglDrvCtx performance reduced  | 2014-12-26 01:21:55 | 
Yes|
| 87725 | [BDW Bisected] OglBatch7 performance reduced  | 2014-12-26 01:03:12 | 
Yes|
| 87662 | [ALL 3.18 Bisected] DVI --rotation inverted c | 2014-12-24 03:13:20 | 
Yes|
| 87131 | [PNV regression] igt/gem_exec_lut_handle take | 2014-12-09 03:06:30 | 
No |
| 84974 | [VLV eDP-LVDS bisected] powerdomains: Screen  | 2014-10-14 05:11:02 | 
Yes|
| 84855 | [ILK regression]igt kms_rotation_crc/sprite-r | 2014-10-10 03:21:52 | 
No |
| 81537 | [snb dp regression] dp retry forever due to s | 2014-07-19 14:51:21 | 
No |
| 72782 | [945GM bisected] screen blank on S3 resume on | 2013-12-17 10:02:50 | 
Yes|
+---+---+-++

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] lib/igt_kms: Add COMIT_ATOMIC to igt_display_commit2()

2016-01-31 Thread Mayuresh Gharpure
Co-Author : Marius Vlad 

So far we have had only two commit styles, COMMIT_LEGACY
and COMMIT_UNIVERSAL. This patch adds another commit style
COMMIT_ATOMIC which makes use of drmModeAtomicCommit()

Signed-off-by: Mayuresh Gharpure 
---
 lib/igt_kms.c | 318 +-
 lib/igt_kms.h |  71 -
 2 files changed, 387 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..6c07223 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -145,6 +145,120 @@ const unsigned char* igt_kms_get_base_edid(void)
  *
  * Returns: an alternate edid block
  */
+static const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
+   "SRC_X",
+   "SRC_Y",
+   "SRC_W",
+   "SRC_H",
+   "CRTC_X",
+   "CRTC_Y",
+   "CRTC_W",
+   "CRTC_H",
+   "FB_ID",
+   "CRTC_ID",
+   "type",
+   "rotation"
+};
+
+static const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
+   "background_color"
+};
+
+static const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
+   "scaling mode",
+   "DPMS"
+};
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * plane->atomic_props_plane.
+ */
+static void
+igt_atomic_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
+   int num_props, const char **prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, plane->drm_plane->plane_id, 
DRM_MODE_OBJECT_PLANE);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_props; j++) {
+   if (strcmp(prop->name, prop_names[j]) != 0)
+   continue;
+
+   plane->atomic_props_plane[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+}
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * config->atomic_props_crtc and config->atomic_props_connector.
+ */
+static void
+igt_atomic_fill_props(igt_display_t *display, igt_output_t *output,
+   int num_crtc_props, const char **crtc_prop_names,
+   int num_connector_props, const char **conn_prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, output->config.crtc->crtc_id, 
DRM_MODE_OBJECT_CRTC);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_crtc_props; j++) {
+   if (strcmp(prop->name, crtc_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_crtc[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+   props = NULL;
+   props = drmModeObjectGetProperties(fd, 
output->config.connector->connector_id, DRM_MODE_OBJECT_CONNECTOR);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_connector_props; j++) {
+   if (strcmp(prop->name, conn_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_connector[j] = 
props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+
+}
+
 const unsigned char* igt_kms_get_alt_edid(void)
 {
update_edid_csum(alt_edid);
@@ -952,6 +1066,8 @@ static void igt_output_refresh(igt_output_t *output)
kmstest_pipe_name(output->config.pipe));
 
display->pipes_in_use |= 1 << output->config.pipe;
+   igt_atomic_fill_props(display, output, IGT_NUM_CRTC_PROPS, 
igt_crtc_prop_names,
+   IGT_NUM_CONNECTOR_PROPS, igt_connector_prop_names);
 }
 
 static bool
@@ -1020,6 +1136,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 {
drmModeRes *resources;
drmModePlaneRes *plane_resources;
+   drmModeObjectPropertiesPtr props;
int i;
 
memset(display, 0, sizeof(igt_display_t));
@@ -1094,6 +1211,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 
plane->pipe = pipe;

Re: [Intel-gfx] [PATCH] lib/igt_kms: Add COMIT_ATOMIC to igt_display_commit2()

2016-01-31 Thread Mayuresh Gharpure

Hi Marius,

I've incorporated your review comments in :
https://patchwork.freedesktop.org/patch/72179/

One of the comments regarding CHECK_RETURN is already taken care in 
do_display_commit method, after returning from igt_atomic_commit


Regards,
Mayuresh

On 1/29/2016 6:15 PM, Marius Vlad wrote:

Hi,
I still do not see FB_ID set to 0 when disabling the plane in
igt_atomic_prepare_plane_commit().

See 
http://lists.freedesktop.org/archives/intel-gfx/2016-January/085790.html


On Fri, Jan 29, 2016 at 02:17:11PM +0530, Mayuresh Gharpure wrote:

Co-Author : Marius Vlad 

So far we have had only two commit styles, COMMIT_LEGACY
and COMMIT_UNIVERSAL. This patch adds another commit style
COMMIT_ATOMIC which makes use of drmModeAtomicCommit()

Signed-off-by: Mayuresh Gharpure 
---
  lib/igt_kms.c | 317 +-
  lib/igt_kms.h |  71 -
  2 files changed, 386 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..73883d3 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -145,6 +145,120 @@ const unsigned char* igt_kms_get_base_edid(void)
   *
   * Returns: an alternate edid block
   */
+static const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
+   "SRC_X",
+   "SRC_Y",
+   "SRC_W",
+   "SRC_H",
+   "CRTC_X",
+   "CRTC_Y",
+   "CRTC_W",
+   "CRTC_H",
+   "FB_ID",
+   "CRTC_ID",
+   "type",
+   "rotation"
+};
+
+static const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
+   "background_color"
+};
+
+static const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
+   "scaling mode",
+   "DPMS"
+};
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * plane->atomic_props_plane.
+ */
+static void
+igt_atomic_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
+   int num_props, const char **prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, plane->drm_plane->plane_id, 
DRM_MODE_OBJECT_PLANE);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_props; j++) {
+   if (strcmp(prop->name, prop_names[j]) != 0)
+   continue;
+
+   plane->atomic_props_plane[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+}
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * config->atomic_props_crtc and config->atomic_props_connector.
+ */
+static void
+igt_atomic_fill_props(igt_display_t *display, igt_output_t *output,
+   int num_crtc_props, const char **crtc_prop_names,
+   int num_connector_props, const char **conn_prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, output->config.crtc->crtc_id, 
DRM_MODE_OBJECT_CRTC);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_crtc_props; j++) {
+   if (strcmp(prop->name, crtc_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_crtc[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+   props = NULL;
+   props = drmModeObjectGetProperties(fd, 
output->config.connector->connector_id, DRM_MODE_OBJECT_CONNECTOR);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_connector_props; j++) {
+   if (strcmp(prop->name, conn_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_connector[j] = 
props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+
+}
+
  const unsigned char* igt_kms_get_alt_edid(void)
  {
update_edid_csum(alt_edid);
@@ -952,6 +1066,8 @@ static void igt_output_refresh(igt_output_t *output)
kmstest_pipe_name(output->config.pipe));
  
  	display->pipes_in_use |= 1 << 

Re: [Intel-gfx] [PATCH 2/5] drm/i915: Cleaning up intel_dp_hpd_pulse

2016-01-31 Thread Thulasimani, Sivakumar



On 1/29/2016 5:33 PM, Ander Conselvan De Oliveira wrote:

On Fri, 2016-01-29 at 14:31 +0530, Shubhangi Shrivastava wrote:

On Tuesday 26 January 2016 06:52 PM, Ander Conselvan De Oliveira wrote:

On Tue, 2016-01-19 at 16:07 +0530, Shubhangi Shrivastava wrote:

Current DP detection has DPCD operations split across
intel_dp_hpd_pulse and intel_dp_detect which contains
duplicates as well. Also intel_dp_detect is called
during modes enumeration as well which will result
in multiple dpcd operations. So this patch tries
to solve both these by bringing all DPCD operations
in one single function and make intel_dp_detect
use existing values instead of repeating same steps.

v2: Pulled in a hunk from last patch of the series to
  this patch. (Ander)
v3: Added MST hotplug handling. (Ander)

Tested-by: Nathan D Ciobanu 
Signed-off-by: Sivakumar Thulasimani 
Signed-off-by: Shubhangi Shrivastava 
---
   drivers/gpu/drm/i915/intel_dp.c | 71 +--
-
-
   1 file changed, 44 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c
b/drivers/gpu/drm/i915/intel_dp.c
index 8969ff9..82ee18d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c

[...]


@@ -4693,7 +4717,8 @@ intel_dp_detect(struct drm_connector *connector,
bool
force)
return connector_status_disconnected;
}
   
-	intel_dp_long_pulse(intel_dp->attached_connector);

+   if (force)
+   intel_dp_long_pulse(intel_dp->attached_connector);

I didn't notice this at first, but force is not the right thing to check for
here. It is basically intended to avoid doing load detection (see
intel_get_load_detect_pipe()) on automated polling. But we still have to try
detection here when force = false, otherwise this will cause a regression.

If you plug in a DP device while suspended, that device won't get detected,
since we don't get an HPD for it. Previously, the call do intel_dp_detect()
with
force = false from intel_drm_resume() (via drm_helper_hpd_irq_event()) would
cause a full detection.

To avoid the repeated DPCD operations, I think we need a more explicit
mechanism
to signal that we already handled the long pulse via the HPD handler. In
intel_dp_hpd_pulse() we could set a flag that tells we just handled a long
pulse
for the given port. The call to intel_dp_long_pulse() in intel_dp_detect()
would
then be dependent on that flag.

For that reason I have to retract my R-b from this patch.

Ander

Call to intel_dp_detect() from get_modes is with force set to true while
from resume the call is with force set to false.. It should be in the
opposite manner as get_modes should not require full detection whereas
resume should. So, this needs to be cleaned up there. After merge of
these patches, will look into cleaning up that part of the code.

That really depends on what the force parameter is supposed to mean. The
documentation states that "force is set to false whilst polling, true when
checking the connector due to a user request". A look through git history shows
the parameter was added to reduce time wasted doing load detection (doing a mode
set in order to check if there is a device connected) for hardware that needs it
(commit 7b334fcb45b7).

As far as I can tell, across all the drm drivers, that parameter is only used to
avoid doing load detection.

Another thing to consider is that the driver may switch to polling if it detects
an HPD storm. When the detect calls come from polling, the code in this patch
will simply avoid any detection.


hmm i think this discussion will prolong for a while :)
how about we call intel_dp_long_pulse() always for now.
this will be a compromise to not break any of the existing code
but will still result in getting a clean detection code, which
will can then be improved upon in the next iteration ?
i.e post the change it should look like. i.e skip this change alone

intel_dp_long_pulse(intel_dp->attached_connector);


regards,
Sivakumar

Moreover, intel_dp_detect() will be called from
drm_helper_hpd_irq_event() in polling scenarios only (when
DRM_CONNECTOR_POLL_HPD flag is set in connector->polled). So, seems like
this code here, doesn't really create a regression for realtime scenarios.

I don't know what you mean by realtime scenarios, but the regression is very
real. Using a kernel with your patches applied, suspend while there is no DP
monitor attached, attach the monitor while suspended and then wake up. Notice
how the connector state doesn't change. You can check the i915_display_info file
in debugfs, for instance.


Ander

   

if (intel_connector->detect_edid)
return connector_status_connected;
@@ -5026,25 +5051,25 @@ intel_dp_hpd_pulse(struct intel_digital_port
*intel_dig_port, bool long_hpd)
/* indicate that we need to restart link training */

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Allow i915_gem_object_get_page() on userptr as well

2016-01-31 Thread Patchwork
== Summary ==

Series 2929v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/2929/revisions/1/mbox/

Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass   -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS   (bsw-nuc-2)

bdw-nuci7total:156  pass:147  dwarn:0   dfail:0   fail:0   skip:9  
bdw-ultratotal:159  pass:147  dwarn:0   dfail:0   fail:0   skip:12 
bsw-nuc-2total:159  pass:129  dwarn:0   dfail:0   fail:0   skip:30 
byt-nuc  total:159  pass:136  dwarn:0   dfail:0   fail:0   skip:23 
hsw-brixbox  total:159  pass:146  dwarn:0   dfail:0   fail:0   skip:13 
ilk-hp8440p  total:159  pass:110  dwarn:1   dfail:0   fail:0   skip:48 
ivb-t430stotal:159  pass:145  dwarn:0   dfail:0   fail:0   skip:14 
skl-i5k-2total:159  pass:144  dwarn:1   dfail:0   fail:0   skip:14 
snb-dellxps  total:159  pass:137  dwarn:0   dfail:0   fail:0   skip:22 

Results at /archive/results/CI_IGT_test/Patchwork_1327/

6b1049b84dcd979f631d15b2ada325d8e5b2c4e1 drm-intel-nightly: 
2016y-01m-29d-22h-50m-57s UTC integration manifest
2d19f3bf56071780e20aab50b36771e1b1f15dfb drm/i915: Don't ERROR for an expected 
intel_rcs_ctx_init() interruption
cec39bb746117d306211645da8f7d7b0987552b7 drm/i915: Fix some invalid requests 
cancellations
3f539b201c3923aabf098c9edbf6cbea279876fc drm/i915: Allow 
i915_gem_object_get_page() on userptr as well

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] lib/igt_kms: Add COMIT_ATOMIC to igt_display_commit2()

2016-01-31 Thread Mayuresh Gharpure
Co-Author : Marius Vlad 

So far we have had only two commit styles, COMMIT_LEGACY
and COMMIT_UNIVERSAL. This patch adds another commit style
COMMIT_ATOMIC which makes use of drmModeAtomicCommit()

Signed-off-by: Mayuresh Gharpure 
---
 lib/igt_kms.c | 317 +-
 lib/igt_kms.h |  71 -
 2 files changed, 386 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..73883d3 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -145,6 +145,120 @@ const unsigned char* igt_kms_get_base_edid(void)
  *
  * Returns: an alternate edid block
  */
+static const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
+   "SRC_X",
+   "SRC_Y",
+   "SRC_W",
+   "SRC_H",
+   "CRTC_X",
+   "CRTC_Y",
+   "CRTC_W",
+   "CRTC_H",
+   "FB_ID",
+   "CRTC_ID",
+   "type",
+   "rotation"
+};
+
+static const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
+   "background_color"
+};
+
+static const char *igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
+   "scaling mode",
+   "DPMS"
+};
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * plane->atomic_props_plane.
+ */
+static void
+igt_atomic_fill_plane_props(igt_display_t *display, igt_plane_t *plane,
+   int num_props, const char **prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, plane->drm_plane->plane_id, 
DRM_MODE_OBJECT_PLANE);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_props; j++) {
+   if (strcmp(prop->name, prop_names[j]) != 0)
+   continue;
+
+   plane->atomic_props_plane[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+}
+
+/*
+ * Retrieve all the properies specified in props_name and store them into
+ * config->atomic_props_crtc and config->atomic_props_connector.
+ */
+static void
+igt_atomic_fill_props(igt_display_t *display, igt_output_t *output,
+   int num_crtc_props, const char **crtc_prop_names,
+   int num_connector_props, const char **conn_prop_names)
+{
+   drmModeObjectPropertiesPtr props;
+   int i, j, fd;
+
+   fd = display->drm_fd;
+
+   props = drmModeObjectGetProperties(fd, output->config.crtc->crtc_id, 
DRM_MODE_OBJECT_CRTC);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_crtc_props; j++) {
+   if (strcmp(prop->name, crtc_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_crtc[j] = props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+   props = NULL;
+   props = drmModeObjectGetProperties(fd, 
output->config.connector->connector_id, DRM_MODE_OBJECT_CONNECTOR);
+   igt_assert(props);
+
+   for (i = 0; i < props->count_props; i++) {
+   drmModePropertyPtr prop =
+   drmModeGetProperty(fd, props->props[i]);
+
+   for (j = 0; j < num_connector_props; j++) {
+   if (strcmp(prop->name, conn_prop_names[j]) != 0)
+   continue;
+
+   output->config.atomic_props_connector[j] = 
props->props[i];
+   break;
+   }
+
+   drmModeFreeProperty(prop);
+   }
+
+   drmModeFreeObjectProperties(props);
+
+}
+
 const unsigned char* igt_kms_get_alt_edid(void)
 {
update_edid_csum(alt_edid);
@@ -952,6 +1066,8 @@ static void igt_output_refresh(igt_output_t *output)
kmstest_pipe_name(output->config.pipe));
 
display->pipes_in_use |= 1 << output->config.pipe;
+   igt_atomic_fill_props(display, output, IGT_NUM_CRTC_PROPS, 
igt_crtc_prop_names,
+   IGT_NUM_CONNECTOR_PROPS, igt_connector_prop_names);
 }
 
 static bool
@@ -1020,6 +1136,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 {
drmModeRes *resources;
drmModePlaneRes *plane_resources;
+   drmModeObjectPropertiesPtr props;
int i;
 
memset(display, 0, sizeof(igt_display_t));
@@ -1094,6 +1211,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 
plane->pipe = pipe;

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Sanity check DP AUX message buffer and size

2016-01-31 Thread Thulasimani, Sivakumar



On 1/29/2016 6:22 PM, Imre Deak wrote:

While we are calling intel_dp_aux_transfer() with msg->size=0 whenever
msg->buffer is NULL, passing NULL to memcpy() is undefined according to
the ISO C standard. I haven't found any notes about this in the GNU C's
or the kernel's documentation of the function and can't imagine what it
would do with the NULL ptr. To better document this use of the
parameters it still make sense to add an explicit check for this to the
code.

Caught by Coverity.

can you share more info on when is this scenario triggered ?

Signed-off-by: Imre Deak 
---
  drivers/gpu/drm/i915/intel_dp.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e2bea710..2aed36e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -979,7 +979,10 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct 
drm_dp_aux_msg *msg)
if (WARN_ON(txsize > 20))
return -E2BIG;
  
-		memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);

+   if (msg->buffer)
+   memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
+   else
+   WARN_ON(msg->size);
  
  		ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);

if (ret > 0) {


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/bxt: update list of PCIIDs

2016-01-31 Thread Matt Roper
On Thu, Jan 28, 2016 at 04:04:12PM +0200, Imre Deak wrote:
> Add PCIIDs for new versions of the SOC, based on BSpec. Also add the
> name of the versions as code comment where this is available. The new
> versions don't have any changes visible to the kernel driver.
> 
> Signed-off-by: Imre Deak 
> ---
>  include/drm/i915_pciids.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
> index f970209..9b48ac1 100644
> --- a/include/drm/i915_pciids.h
> +++ b/include/drm/i915_pciids.h
> @@ -296,7 +296,9 @@
>  #define INTEL_BXT_IDS(info) \
>   INTEL_VGA_DEVICE(0x0A84, info), \
>   INTEL_VGA_DEVICE(0x1A84, info), \
> - INTEL_VGA_DEVICE(0x5A84, info)
> + INTEL_VGA_DEVICE(0x1A85, info), \

I don't see 0x1A85 in the bspec (at least not in the "Configurations ->
Steppings and Device IDs" section...is there another list elsewhere in
the bspec you got it from?)

Semi-related...the revision ID vs stepping info on that page doesn't
seem to quite match what we have in bxt_stepping_info[] in intel_csr.c
(plus it looks like we have some new revision ID's we could add in
general).


Matt

> + INTEL_VGA_DEVICE(0x5A84, info), /* APL HD Graphics 505 */ \
> + INTEL_VGA_DEVICE(0x5A85, info)  /* APL HD Graphics 500 */
>  
>  #define INTEL_KBL_GT1_IDS(info)  \
>   INTEL_VGA_DEVICE(0x5913, info), /* ULT GT1.5 */ \
> -- 
> 2.5.0
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: [linux] drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2) (43d59ed)

2016-01-31 Thread Jani Nikula
On Sun, 31 Jan 2016, Daniel Vetter  wrote:
> It's a github comment so pretty hopeless to follow up with the reporter,
> but it sounds like we have a culprit for the ilk wm issues/fifo
> underruns.

https://bugs.freedesktop.org/show_bug.cgi?id=93892

BR,
Jani.

> -Daniel
>
> -- Forwarded message --
> From: Manfred G Kitzbichler 
> Date: Sat, Jan 30, 2016 at 5:42 AM
> Subject: Re: [linux] drm/i915: Eliminate usage of plane_wm_parameters from
> ILK-style WM code (v2) (43d59ed)
> To: torvalds/linux 
> Cc: Daniel Vetter 
>
>
> As stated above, this commit introduced a screen flicker regression. Please
> fix asap!
>
> (cf.
> http://cgit.freedesktop.org/drm-intel/commit/?id=54da691deb123c045259ebf4f5c67381244f58f1
> )
>
> —
> Reply to this email directly or view it on GitHub
> 
> .

-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx