[PATCH v4] drm/panel: simple: Add support for AUO t215hvn01

2016-10-11 Thread Haixia Shi
spec v4: add dt-binding documentation Signed-off-by: Haixia Shi Tested-by: Haixia Shi Reviewed-by: Stéphane Marchesin Cc: Emil Velikov Cc: Thierry Reding Cc: David Airlie Cc: Rob Herring <robh+dt at kernel.org> Cc: Mark Rutland Cc: devicetree at vger.kernel.org Cc: linux-kern

[PATCH v3] drm/panel: simple: Add support for AUO t215hvn01

2016-10-10 Thread Haixia Shi
The AUO t215hvn01 is a 21.5" 1920x1080 panel. Link to spec: http://www.udmgroup.com/ftp/T215HVN01.0.pdf v2: fix alphabetical order v3: remove minor revision suffix ".0" and add link to spec Signed-off-by: Haixia Shi Tested-by: Haixia Shi Reviewed-by: Stéphane Marchesin Cc: E

[PATCH v2] drm/panel: simple: Add support for AUO t215hvn01

2016-10-10 Thread Haixia Shi
The AUO t215hvn01 is a 21.5" 1920x1080 panel. v2: fix alphabetical order Signed-off-by: Haixia Shi Tested-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/panel/panel-simple.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/driver

[PATCH] CHROMIUM: drm/panel: simple: Add support for AUO t215hvn01

2016-10-10 Thread Haixia Shi
The AUO t215hvn01 is a 21.5" 1920x1080 panel. Signed-off-by: Haixia Shi Reviewed-on: https://chromium-review.googlesource.com/394328 Tested-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/panel/panel-simple.c | 30 ++ 1 file change

[PATCH 1/2] drm/udl: fix a NULL pointer reference in udl_gem_free_object().

2016-08-31 Thread Haixia Shi
iel Vetter wrote: >> On Wed, Aug 31, 2016 at 10:45 PM, Haixia Shi wrote: >>> For details see https://bugs.chromium.org/p/chromium/issues/detail?id=468050 >>> >>> So drm_mode_config_cleanup() is called from udl_driver_unload() in >>> which we found the

[PATCH 1/2] drm/udl: fix a NULL pointer reference in udl_gem_free_object().

2016-08-31 Thread Haixia Shi
the actual drm_buf_release comes in which attempts to release the buffer again. On Wed, Aug 31, 2016 at 12:55 AM, Daniel Vetter wrote: > > On Tue, Aug 30, 2016 at 02:50:20PM -0700, Haixia Shi wrote: > > Previously this function had a NULL pointer check for gem->map_list.map, bu

[PATCH 2/2] drm/udl: implement usb_driver suspend/resume.

2016-08-30 Thread Haixia Shi
connected TEST=suspend with UDL, unplug UDL and resume TEST=suspend with UDL, unplug and connect another UDL device then resume Signed-off-by: Haixia Shi Reviewed-by: Stphane Marchesin --- drivers/gpu/drm/udl/udl_drv.c | 17 + drivers/gpu/drm/udl/udl_drv.h | 2 ++ drivers/gpu

[PATCH 1/2] drm/udl: fix a NULL pointer reference in udl_gem_free_object().

2016-08-30 Thread Haixia Shi
NULL because udl_gem_free_object() may come in after the vma manager is destroyed. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/

[PATCH v3 2/2] drm: remove drm_device_is_unplugged and related code

2016-02-16 Thread Haixia Shi
David - is the v3 patch acceptable to you? Thanks. On Fri, Feb 12, 2016 at 11:50 AM, Haixia Shi wrote: > v1: Remove the general drm_device_is_unplugged() checks, and move the > unplugged > flag handling logic into drm/udl. In general we want to keep > driver-specific > logic ou

[PATCH v3 2/2] drm: remove drm_device_is_unplugged and related code

2016-02-12 Thread Haixia Shi
unplugged. This allows user-space to properly deallocate fbs and dumb buffers before closing the device. This drops the "unplugged" flag hack, which puts the device in a non-functional state after USB unplug and rejects most operations on the device such as ioctls with error -ENODEV. Signe

[PATCH v3 2/2] drm: remove drm_device_is_unplugged and related code

2016-02-11 Thread Haixia Shi
the device in a non-functional state after USB unplug and rejects most operations on the device such as ioctls with error -ENODEV. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin Cc: David Herrmann --- drivers/gpu/drm/drm_drv.c | 6 -- drivers/gpu/drm/drm_fops.c

[PATCH v2 2/2] drm: remove drm_device_is_unplugged checks in common drm code.

2016-02-11 Thread Haixia Shi
et_edid: only called from udl_get_modes, won't be an issue because connectors are already unplugged So, it seems that I *really* just need to drop the "unplugged" flag and update the commit message. On Thu, Feb 11, 2016 at 2:30 AM, David Herrmann wrote: > Hi > > On Thu, Feb 11, 201

[PATCH v2 2/2] drm: remove drm_device_is_unplugged checks in common drm code.

2016-02-10 Thread Haixia Shi
When USB cable is disconnected, we mark udl device as unplugged so that udl_detect reports connector status as disconnected, but still keep the drm device alive until user-space closes it. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/drm_drv.c | 6

[PATCH v2 2/2] drm: remove drm_device_is_unplugged checks in common drm code.

2016-02-10 Thread Haixia Shi
When USB cable is disconnected, we mark udl device as unplugged so that udl_detect reports connector status as disconnected, but still keep the drm device alive until user-space closes it. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/drm_drv.c | 6

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-10 Thread Haixia Shi
the common drm code. Do you have a suggestion how to get around it? On Wed, Feb 10, 2016 at 1:35 PM, David Herrmann wrote: > Hi > > On Wed, Feb 10, 2016 at 9:51 PM, Haixia Shi wrote: > >> This should rather be: > >> > >> drm_release(inode, filp); >

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-10 Thread Haixia Shi
ed, Feb 10, 2016 at 12:51 PM, Haixia Shi wrote: > > This should rather be: > > > > drm_release(inode, filp); > > mutex_lock(_global_mutex); > > if (!dev->open_count && udl_device_is_unplugged(dev)) > >

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-10 Thread Haixia Shi
turn 0; > > There is no reason to look at the return code of drm_release(), ever. But drm_release() does return a retcode. It would still make sense to return that as-is in case any existing code relies on it. On Wed, Feb 10, 2016 at 4:24 AM, David Herrmann wrote: > Hi > > On Tue, F

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-10 Thread Haixia Shi
proposed adding an "UNPLUG_DISALLOW" flag to ioctls so that we can whitelist them on a case-by-case basis but that proposal got shot down as being unnecessary, but you can see my original patch at https://chromium-review.googlesource.com/#/c/326160/ On Wed, Feb 10, 2016 at 4:24 AM,

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-09 Thread Haixia Shi
Remove the general drm_device_is_unplugged() checks, and move the unplugged flag handling logic into drm/udl. In general we want to keep driver-specific logic out of common drm code. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/drm_drv.c | 6

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-09 Thread Haixia Shi
2016 at 4:44 AM, David Herrmann wrote: > Hi > > On Fri, Feb 5, 2016 at 10:57 PM, Haixia Shi wrote: > > Remove the general drm_device_is_unplugged() checks, and move the > unplugged > > flag handling logic into drm/udl. In general we want to keep > driver-specific > >

[PATCH 2/2] drm: make unplugged flag specific to udl driver

2016-02-05 Thread Haixia Shi
Remove the general drm_device_is_unplugged() checks, and move the unplugged flag handling logic into drm/udl. In general we want to keep driver-specific logic out of common drm code. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/drm_drv.c | 6

[PATCH 1/2] drm/msm: remove the drm_device_is_unplugged check

2016-02-05 Thread Haixia Shi
This flag is only used for drm/udl. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/msm/msm_fbdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c index d95af6e..e119c29 100644 --- a/drivers

[PATCH] drm/udl: implement usb_driver suspend/resume.

2015-04-01 Thread Haixia Shi
The usb_driver suspend and resume function pointers must be populated to prevent forced unbinding of USB interface driver. See usb/core/driver.c: unbind_no_pm_drivers_interfaces(). Restore mode and damage the entire frame buffer upon resume. Signed-off-by: Haixia Shi Reviewed-by: Stéphane

[PATCH 2/2] drm/udl: implement cursor.

2015-03-05 Thread Haixia Shi
On Thu, Mar 5, 2015 at 3:54 AM, David Herrmann wrote: > Hi > > Why pretend the hw supports cursors if it clearly does not? I don't > see why we cannot leave this to user-space (which can apply > optimizations for software-only devices, which the kernel cannot). And > a commit-message would also

[PATCH 1/2] drm/udl: make page flips asynchronous.

2015-03-05 Thread Haixia Shi
On Thu, Mar 5, 2015 at 2:33 AM, Chris Wilson wrote: > On Wed, Mar 04, 2015 at 06:26:23PM -0800, Haixia Shi wrote: >> This also limits the maximum frequency of page flips by the vrefresh rate. >> >> Signed-off-by: Haixia Shi >> Reviewed-by: Stéphane Marchesin >

[PATCH 2/2] drm/udl: implement cursor.

2015-03-04 Thread Haixia Shi
Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin Tested-by: Haixia Shi --- drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl/udl_cursor.c | 156 + drivers/gpu/drm/udl/udl_cursor.h | 46 +++ drivers/gpu/drm/udl/udl_drv.h

[PATCH 1/2] drm/udl: make page flips asynchronous.

2015-03-04 Thread Haixia Shi
This also limits the maximum frequency of page flips by the vrefresh rate. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_drv.h | 3 + drivers/gpu/drm/udl/udl_modeset.c | 129 ++ 2 files

[PATCH] drm/udl: properly set active_16 flag in udl_crtc_page_flip(). (v2)

2015-01-30 Thread Haixia Shi
When page flipping, we need to mark the new fb as active and unmark the active flag for the old fb (if different). Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_modeset.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] drm/udl: fix excessive prefetch_range (v2)

2015-01-30 Thread Haixia Shi
The prefetch_range amount is already in number of bytes. Multiplying again by bpp is unnecessary. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 1/2] drm/udl: optimize udl_compress_hline16 (v2)

2015-01-30 Thread Haixia Shi
The run-length encoding algorithm should compare 16-bit encoded pixel values instead of comparing raw pixel values. It allows pixels with similar but different colors to be encoded as repeat pixels, and thus potentially save USB bandwidth. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz

[PATCH 2/2] drm/udl: fix excessive prefetch_range

2015-01-30 Thread Haixia Shi
The prefetch_range amount is already in number of bytes. Multiplying again by bpp is unnecessary. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 1/2] drm/udl: optimize udl_compress_hline16

2015-01-30 Thread Haixia Shi
The run-length encoding algorithm should compare 16-bit encoded pixel values instead of comparing raw pixel values. It allows pixels with similar but different colors to be encoded as repeat pixels, and thus potentially save USB bandwidth. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz

[PATCH 1/2] drm/udl: optimize udl_compress_hline16

2015-01-30 Thread Haixia Shi
: > On 29 January 2015 at 07:41, Haixia Shi wrote: >> The run-length encoding algorithm should compare 16-bit encoded pixel >> values instead of comparing raw pixel values. It allows pixels >> with similar but different colors to be encoded as repeat pixels, and >> thus pot

[PATCH 1/2] drm/udl: optimize udl_compress_hline16

2015-01-28 Thread Haixia Shi
Sorry about that; I have just re-sent the patches based on upstream code. On Wed, Jan 28, 2015 at 1:12 PM, Chris Wilson wrote: > On Wed, Jan 28, 2015 at 10:15:29AM -0800, Haixia Shi wrote: >> The run-length encoding algorithm should compare 16-bit encoded pixel >> values inste

[PATCH 2/2] drm/udl: fix excessive prefetch_range

2015-01-28 Thread Haixia Shi
The prefetch_range amount is already in number of bytes. Multiplying again by bpp is unnecessary. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 1/2] drm/udl: optimize udl_compress_hline16

2015-01-28 Thread Haixia Shi
The run-length encoding algorithm should compare 16-bit encoded pixel values instead of comparing raw pixel values. It allows pixels with similar but different colors to be encoded as repeat pixels, and thus potentially save USB bandwidth. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz

[PATCH 2/2] drm/udl: fix excessive prefetch_range

2015-01-28 Thread Haixia Shi
The prefetch_range amount is already in number of bytes. Multiplying again by bpp is unnecessary. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz Tested-by: Haixia Shi --- drivers/gpu/drm/udl/udl_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 1/2] drm/udl: optimize udl_compress_hline16

2015-01-28 Thread Haixia Shi
The run-length encoding algorithm should compare 16-bit encoded pixel values instead of comparing raw pixel values. It allows pixels with similar but different colors to be encoded as repeat pixels, and thus potentially save USB bandwidth. Signed-off-by: Haixia Shi Reviewed-by: Daniel Kurtz

[PATCH] drm/udl: properly set active_16 flag in udl_crtc_page_flip().

2015-01-22 Thread Haixia Shi
When page flipping, we need to mark the new fb as active and unmark the active flag for the old fb (if different). Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_modeset.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] drm/udl: properly check for error pointers

2014-11-25 Thread Haixia Shi
The drm_prime_pages_to_sg() function never returns NULL pointers, only error pointers and valid pointers. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_dmabuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 1/2] drm/udl: handle page mapping in dmabuf export.

2014-11-25 Thread Haixia Shi
Fixes dmabuf export failure with -E_NOMEM when the page is not mapped. Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_dmabuf.c | 7 +-- drivers/gpu/drm/udl/udl_drv.h| 2 ++ drivers/gpu/drm/udl/udl_gem.c| 4 ++-- 3 files changed, 9 insertions

[PATCH 2/2] drm/udl: add support to export a handle to a FD on UDL.

2014-11-12 Thread Haixia Shi
Sorry I forgot to remove the Change-Id lines for these 2 patches. Please review and I'll send updated patches with the Change-Id lines removed. On Wed, Nov 12, 2014 at 6:33 PM, Haixia Shi wrote: > Only importing an FD to a handle is currently supported on UDL, > but the exporting functio

[PATCH 2/2] drm/udl: add support to export a handle to a FD on UDL.

2014-11-12 Thread Haixia Shi
Only importing an FD to a handle is currently supported on UDL, but the exporting functionality is equally useful. Change-Id: If4983041875ebf3bd2ecf996d0771eb77b0cf1dc Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl

[PATCH 1/2] drm/udl: add cache flags definitions for udl_gem_object

2014-11-12 Thread Haixia Shi
By default set udl_gem_object as cacheable, but set WC flag when attaching dmabuf. In udl_gem_mmap() update cache attributes based on the flags, similar to exynos_drm_gem_mmap(). Change-Id: I00e5e67f2285d66adcf2ae652a9d59f12af64541 Signed-off-by: Haixia Shi Reviewed-by: Sonny Rao Reviewed