[PATCH v2 2/2] drm/i915/cmdparser: Do not check past the cmd length.

2018-02-05 Thread Michal Srb
command length, reject the command. Signed-off-by: Michal Srb --- v2: Return false instead of continuing - reject the command instead of ignoring. drivers/gpu/drm/i915/i915_cmd_parser.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers

[PATCH 1/2] drm/i915/cmdparser: Check reg_table_count before derefencing.

2018-02-05 Thread Michal Srb
MI_STORE_REGISTER_MEM. When trying to check such command, the find_reg would dereference NULL pointer. Now it will just return NULL meaning that the register was not found and the command will be rejected. Signed-off-by: Michal Srb --- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++-- 1 file

[PATCH 2/2] drm/i915/cmdparser: Do not check past the cmd length.

2018-02-05 Thread Michal Srb
the offset ends up outside of the command length, just ignore it. Signed-off-by: Michal Srb --- drivers/gpu/drm/i915/i915_cmd_parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c index de7ec59433d1

[PATCH 0/2] Fixes in drm/i915/cmdparser.

2018-02-05 Thread Michal Srb
it is worth sharing it here. Michal Srb (2): drm/i915/cmdparser: Check reg_table_count before derefencing. drm/i915/cmdparser: Do not check bits past the cmd length. drivers/gpu/drm/i915/i915_cmd_parser.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.13.6

Re: [PATCH] drm/ttm: Use ttm_bo_default_io_mem_pfn if io_mem_pfn is NULL

2017-11-29 Thread Michal Srb
On Wednesday 29th November 2017 16:24:21 CET Christian König wrote: > Am 29.11.2017 um 16:20 schrieb Michal Srb: > > The io_mem_pfn field was added in commit > > ea642c3216cb2a60d1c0e760ae47ee85c9c16447 and is called unconditionally. > > However, not all drivers w

[PATCH] drm/ttm: Use ttm_bo_default_io_mem_pfn if io_mem_pfn is NULL

2017-11-29 Thread Michal Srb
The io_mem_pfn field was added in commit ea642c3216cb2a60d1c0e760ae47ee85c9c16447 and is called unconditionally. However, not all drivers were updated to set it. Use the ttm_bo_default_io_mem_pfn function if a driver did not set its own. Signed-off-by: Michal Srb --- drivers/gpu/drm/ttm

Re: [PATCH] drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn

2017-11-29 Thread Michal Srb
On středa 29. listopadu 2017 15:47:30 CET Sean Paul wrote: > On Wed, Nov 29, 2017 at 12:33:24PM +0100, m...@suse.com wrote: > > From: Michal Srb > > > > The io_mem_pfn field was added in ea642c3216cb2a60d1c0e760ae47ee85c9c16447 > > and is used unconditionally. Most dri

mgag200: Wrong looking code in mga_probe_vram

2017-10-11 Thread Michal Srb
mean the user space driver is wrong. Thanks, Michal Srb ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/cirrus: Invalidate page tables when pinning a BO

2013-08-06 Thread Michal Srb
s causes crashes when changing resolution down. Signed-off-by: Michal Srb --- diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 0047012..69fd8f1 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -328,6 +328,

[PATCH] drm/cirrus: Invalidate page tables when pinning a BO

2013-08-06 Thread Michal Srb
s causes crashes when changing resolution down. Signed-off-by: Michal Srb --- diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 0047012..69fd8f1 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -328,6 +328,

[PATCH] drm/cirrus: Invalidate page tables when pinning a BO

2013-07-30 Thread Michal Srb
s causes crashes when changing resolution down. Signed-off-by: Michal Srb --- diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 0047012..69fd8f1 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -328,6 +328,

[PATCH] drm/cirrus: Invalidate page tables when pinning a BO

2013-07-30 Thread Michal Srb
s causes crashes when changing resolution down. Signed-off-by: Michal Srb --- diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 0047012..69fd8f1 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -328,6 +328,

Re: [Intel-gfx] [PATCH] drm/i915: Add i915.dp_limit_max_lane_count driver option.

2013-04-02 Thread Michal Srb
On Tuesday 26 of March 2013 16:49:30 Daniel Vetter wrote: > On Tue, Mar 26, 2013 at 4:40 PM, Michal Srb wrote: > > I have IBM POS machine (4852-570 Truman) that has internal monitor > > connected over display port. It reports to have 2 lanes, but only 1 > > lane works reliab

[Intel-gfx] [PATCH] drm/i915: Add i915.dp_limit_max_lane_count driver option.

2013-04-02 Thread Michal Srb
On Tuesday 26 of March 2013 16:49:30 Daniel Vetter wrote: > On Tue, Mar 26, 2013 at 4:40 PM, Michal Srb wrote: > > I have IBM POS machine (4852-570 Truman) that has internal monitor > > connected over display port. It reports to have 2 lanes, but only 1 > > lane works reliab