[PATCH 12/36] drm: omapdrm: Pass integer source coordinates to omap_plane_mode_set()

2015-03-24 Thread Tomi Valkeinen
From: Laurent Pinchart The function will convert the Q16 source coordinates to integers, avoid converting integers to Q16 first and perform the opposite conversion. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_crtc.c | 21 + drivers/gpu/drm/omapdrm/omap

[PATCH 17/36] drm/omap: clear omap_obj->paddr in omap_gem_put_paddr()

2015-03-24 Thread Tomi Valkeinen
Clear omap_obj's paddr when unmapping the memory, so that it's easier to catch bad use of the paddr. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c i

[PATCH 18/36] drm/omap: add pin refcounting to omap_framebuffer

2015-03-24 Thread Tomi Valkeinen
omap_framebuffer_pin() and omap_framebuffer_unpin() are currently broken, as they cannot be called multiple times (i.e. pin, pin, unpin, unpin), which is what happens in certain cases. This issue causes the driver to possibly use 0 as an address for a displayed buffer, leading to OCP error from DSS

[PATCH 22/36] drm/omap: handle incompatible buffer stride and pixel size

2015-03-24 Thread Tomi Valkeinen
omapdrm doesn't check if the pitch of the framebuffer and the color format's bits-per-pixel are compatible. omapdss requires that the stride of a buffer is an integer number of pixels For example, when using modetest with a display that has x resolution of 1280, and using packed 24 RGB mode (3 byt

[PATCH 23/36] drm/omap: fix TILER on OMAP5

2015-03-24 Thread Tomi Valkeinen
On OMAP5 it is not possible to use TILER buffer with CPU when caching or write-combining is used. Doing so leads to errors from the memory manager. However, on OMAP4, write-combining works fine. This patch adds platform specific data for the TILER, and a function tiler_get_cpu_cache_flags() which

[PATCH 26/36] drm/omap: remove dummy PM functions

2015-03-24 Thread Tomi Valkeinen
omapdrm has dummy functions for platform_device's suspend/resume/shutdown. The functions don't do anything, and those platform device functions are deprecated, so remove them from omapdrm. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_drv.c | 20 1 file chan

[PATCH 27/36] drm/omap: stop connector polling during suspend

2015-03-24 Thread Tomi Valkeinen
When not using proper hotplug detection, DRM polls periodically the connectors to find out if a cable is connected. This polling can happen at any time, even very late in the suspend process. This causes a problem with omapdrm, when the poll happens during the suspend process after GPIOs have been

[PATCH 28/36] drm/omap: use DRM_ERROR_RATELIMITED() for error irqs

2015-03-24 Thread Tomi Valkeinen
omapdrm uses normal DRM_ERROR() print when the HW reports an error. As we sometimes may get a flood of errors, let's rather use DRM_ERROR_RATELIMITED(). Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_crtc.c | 2 +- drivers/gpu/drm/omapdrm/omap_plane.c | 3 ++- 2 files changed, 3

[PATCH 31/36] drm/omap: do not use BUG_ON(!spin_is_locked(x))

2015-03-24 Thread Tomi Valkeinen
spin_is_locked(x) returns always 0 on uniprocessor, triggering BUG() in omapdrm. Change it to use assert_spin_locked() to fix the issue. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapd

[PATCH 33/36] drm/omap: fix race conditon in DMM

2015-03-24 Thread Tomi Valkeinen
The omapdrm DMM code sometimes crashes with: WARNING: CPU: 0 PID: 1235 at lib/list_debug.c:36 __list_add+0x8c/0xbc() list_add double add: new=e9265368, prev=e90139c4, next=e9265368. This is caused by the code calling release_engine() twice for the same engine. dmm_txn_commit(wait=true) call is s

[PATCH 34/36] drm/omap: keep ref to old_fb

2015-03-24 Thread Tomi Valkeinen
We store the fb being page-flipped to 'old_fb' field, but we don't increase the ref count of the fb when doing that. While I am not sure if it can cause problem in practice, it's still safer to keep a ref when storing a pointer to a fb. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/o

[PATCH 35/36] drm/omap: add hibernation callbacks

2015-03-24 Thread Tomi Valkeinen
From: Grygorii Strashko Setting a dev_pm_ops suspend/resume pair but not a set of hibernation functions means those pm functions will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move omap_drm_suspend/om

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 3:32 AM, Daniel Vetter wrote: > On Mon, Mar 23, 2015 at 02:34:27PM -0400, Josh Boyer wrote: >> On Mon, Mar 23, 2015 at 11:33 AM, Josh Boyer >> wrote: >> >> >> >> >> Xi Ruoyao (1): >> >> drm/i915: Ensure plane->state->fb stays in sync with plane->fb >> >> Turns out

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 9:57 AM, Josh Boyer wrote: > On Tue, Mar 24, 2015 at 9:40 AM, Daniel Vetter wrote: >> On Tue, Mar 24, 2015 at 09:15:32AM -0400, Josh Boyer wrote: >>> On Tue, Mar 24, 2015 at 3:32 AM, Daniel Vetter wrote: >>> > On Mon, Mar 23, 2015 at 02:34:27PM -0400, Josh Boyer wrote: >

[PATCH v2 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-24 Thread Jeff Epler
[for just patch 1/4; I didn't look as closely at the others] Reviewed-by: Jeff Epler ...with one half of a caveat (rounded up?): Like most or all of the originals, and like DIV_ROUND_CLOSEST just above it in kernel.h, the new code gives an incorrect answer if the temporary overflows at + un

[PATCH v3 0/7] Use DRM component API in tilcdc to connect to tda998x

2015-03-24 Thread Tomi Valkeinen
On 24/03/15 16:28, Jyri Sarha wrote: > I tried first with 3.19 and then with 4.0-rc5, checked the boot and then > the modetest, but I could not reproduce the trace above. > > In my config I just have CONFIG_DRM=m and CONFIG_DRM_I2C_NXP_TDA998X=m > on top of plain omap2plus_defconfig. Should I tak

[PATCH] drm/msm: Refactor msm drm driver by introducing msm_drm_sub_dev

2015-03-24 Thread jil...@codeaurora.org
> On Thu, Mar 12, 2015 at 4:48 PM, Jilai Wang wrote: >> Introduce msm_drm_sub_dev for each mdp interface component such as >> HDMI/eDP/DSI to contain common information shared with MDP. >> >> Signed-off-by: Jilai Wang >> --- >> drivers/gpu/drm/msm/edp/edp.c | 18 +-- >> driver

[PATCH v3 0/7] Use DRM component API in tilcdc to connect to tda998x

2015-03-24 Thread Jyri Sarha
On 03/24/15 17:16, Tomi Valkeinen wrote: > On 24/03/15 16:28, Jyri Sarha wrote: > >> I tried first with 3.19 and then with 4.0-rc5, checked the boot and then >> the modetest, but I could not reproduce the trace above. >> >> In my config I just have CONFIG_DRM=m and CONFIG_DRM_I2C_NXP_TDA998X=m >> o

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 10:46 AM, Josh Boyer wrote: > On Tue, Mar 24, 2015 at 10:34 AM, Daniel Vetter wrote: >> On Tue, Mar 24, 2015 at 10:22:30AM -0400, Josh Boyer wrote: >>> On Tue, Mar 24, 2015 at 9:57 AM, Josh Boyer >>> wrote: >>> > On Tue, Mar 24, 2015 at 9:40 AM, Daniel Vetter wrote: >>

[PATCH] devicetree: Add vendor prefix for Shelly, Inc.

2015-03-24 Thread Nicolas Ferre
Signed-off-by: Nicolas Ferre --- Thierry, Here it is ;-) Bye, Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index a9eeaa0c5

[PATCH] devicetree: Add vendor prefix for Foxlink Group

2015-03-24 Thread Nicolas Ferre
Signed-off-by: Nicolas Ferre --- Thierry, Boris added the support for a Foxlink panel in this commit: 102932b0e474 (drm/panel: add support for Foxlink FL500WVR00-A0T panel). Here is the vendor prefix. Bye, Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion

[PATCH] drm/msm: Refactor msm drm driver by introducing msm_drm_sub_dev

2015-03-24 Thread jil...@codeaurora.org
> On Tue, Mar 24, 2015 at 11:18 AM, wrote: >> >>> On Thu, Mar 12, 2015 at 4:48 PM, Jilai Wang >>> wrote: Introduce msm_drm_sub_dev for each mdp interface component such as HDMI/eDP/DSI to contain common information shared with MDP. Signed-off-by: Jilai Wang --- dr

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 12:49 PM, Daniel Vetter wrote: > On Tue, Mar 24, 2015 at 05:48:31PM +0100, Daniel Vetter wrote: >> On Tue, Mar 24, 2015 at 12:10:28PM -0400, Josh Boyer wrote: >> > On Tue, Mar 24, 2015 at 10:46 AM, Josh Boyer > > fedoraproject.org> wrote: >> > > On Tue, Mar 24, 2015 at 10:3

[PATCH RFC] drm/tilcdc: Hijack external connectors helper funcs to filter modes

2015-03-24 Thread Jyri Sarha
Hijack external connectors helper funcs to filter modes. TILCDC crtc wants to have its say on which modes are valid. There appears to be no trivial way to do that directly from crtc. This patch goes and hijacks the external connectors helper functions and puts its own mode_valid() function there. T

[PATCH v2 3/4] cpuidle: menu: use DIV_ROUND_CLOSEST_ULL()

2015-03-24 Thread Rafael J. Wysocki
On Tuesday, March 24, 2015 02:03:44 PM Javi Merino wrote: > Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal > implementation and use the kernel one. Can you please CC patch [1/4] to me too at least, so I can see how the new macro is defined without digging it up from the en

[PATCH] drm/bochs: disable video before changing video mode

2015-03-24 Thread Chris Ruffin
qemu and simics simulators both seem to expect that video should be disabled before changing the video mode. references: http://git.qemu.org/?p=qemu.git;a=blob;f=hw/display/vga.c;h=c0f7b343bbab586c8593d29c7a765f1e6ca3662c;hb=HEAD#l727 http://wiki.osdev.org/Bochs_VBE_Extensions#Setting_display_res

[PATCH 19/36] drm/omap: add a comment why locking is missing

2015-03-24 Thread Tomi Valkeinen
unpin_worker() calls omap_framebuffer_unpin() without any locks, which looks very suspicious. However, both pin and unpin are always called via the driver's private workqueue, so the access is synchronized that way. Add a comment to make this clear. Signed-off-by: Tomi Valkeinen --- drivers/gpu

[PATCH 21/36] drm/omap: fix error handling in omap_framebuffer_create()

2015-03-24 Thread Tomi Valkeinen
When an error happens in omap_framebuffer_create(), omap_framebuffer_create() calls omap_framebuffer_destroy() if the fb struct has been allocated. However, that crashes, as omap_framebuffer_destroy(), which calls drm_framebuffer_cleanup(), should only be called after drm_framebuffer_init() Fix th

[PATCH 29/36] drm/omap: fix race with error_irq

2015-03-24 Thread Tomi Valkeinen
omapdrm tries to avoid error floods by unregistering the error irq when an error happens, and then registering the error irq again later. However, the code is racy, as it sometimes tries to unregister the error irq when it's already unregistered, leading to WARN(). Also, the code only registers th

[PATCH 30/36] drm/omap: only ignore DIGIT SYNC LOST for TV output

2015-03-24 Thread Tomi Valkeinen
We need to ignore DIGIT SYNC LOST error when enabling/disabling TV output. The code does that, but it ignores the DIGI SYNC LOST when enabling any output. Normally this does no harm, but it could make us miss DIGIT SYNC LOST on some rare occasions. Fix the code to only ignore DIGIT SYNC LOST when

[PATCH 32/36] drm/omap: fix race condition with dev->obj_list

2015-03-24 Thread Tomi Valkeinen
omap_gem_objects are added to dev->obj_list in omap_gem_new, and removed in omap_gem_free_object. Unfortunately there's no locking for dev->obj_list, which eventually leads to a crash: WARNING: CPU: 1 PID: 1123 at lib/list_debug.c:59 __list_del_entry+0xa4/0xe0() list_del corruption. prev->next sho

[PATCH 36/36] drm/omap: tiler: add hibernation callback

2015-03-24 Thread Tomi Valkeinen
From: Grygorii Strashko Setting a dev_pm_ops resume callback but not a set of hibernation handler means that pm function will not be called upon hibernation. Fix this by using SIMPLE_DEV_PM_OPS, which appropriately assigns the suspend and hibernation handlers and move omap_dmm_resume under CONFI

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 9:40 AM, Daniel Vetter wrote: > On Tue, Mar 24, 2015 at 09:15:32AM -0400, Josh Boyer wrote: >> On Tue, Mar 24, 2015 at 3:32 AM, Daniel Vetter wrote: >> > On Mon, Mar 23, 2015 at 02:34:27PM -0400, Josh Boyer wrote: >> >> On Mon, Mar 23, 2015 at 11:33 AM, Josh Boyer > >> fed

[Intel-gfx] [git pull] drm fixes

2015-03-24 Thread Josh Boyer
On Tue, Mar 24, 2015 at 10:34 AM, Daniel Vetter wrote: > On Tue, Mar 24, 2015 at 10:22:30AM -0400, Josh Boyer wrote: >> On Tue, Mar 24, 2015 at 9:57 AM, Josh Boyer >> wrote: >> > On Tue, Mar 24, 2015 at 9:40 AM, Daniel Vetter wrote: >> >> On Tue, Mar 24, 2015 at 09:15:32AM -0400, Josh Boyer wro

[PATCH] xf86drm: Fix ioctl struct clearing in drmAgpEnable

2015-03-24 Thread Connor Behan
This one is a bit harder to notice. Signed-off-by: Connor Behan --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index e73cddd..ffc53b8 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -1719,7 +1719,7 @@ int drmAgpEnable(int fd, unsigned long mode)

[PATCH v3 0/7] Use DRM component API in tilcdc to connect to tda998x

2015-03-24 Thread Jyri Sarha
On 03/24/15 14:50, Tomi Valkeinen wrote: > Hi, > > On 18/03/15 11:06, Jyri Sarha wrote: >> I think the patches 1-5 are ready for merging. See the details below. > > I applied these on top of v4.0-rc3, booted up BBB, and loaded the modules. > After doing that and waiting a few secs: > > # ./s-bbb.s

[PATCH 16/36] drm/omap: page_flip: return -EBUSY if flip pending

2015-03-24 Thread Tomi Valkeinen
The DRM documentation says: "If a page flip is already pending, the page_flip operation must return -EBUSY." Currently omapdrm returns -EINVAL instead. Fix omapdrm by returning -EBUSY. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_crtc.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] drm/bochs: disable video before changing video mode

2015-03-24 Thread Chris Ruffin
qemu and simics simulators both seem to expect that video should be disabled before changing the video mode. references: http://git.qemu.org/?p=qemu.git;a=blob;f=hw/display/vga.c;h=c0f7b343bbab586c8593d29c7a765f1e6ca3662c;hb=HEAD#l727 http://wiki.osdev.org/Bochs_VBE_Extensions#Setting_display_res

<    1   2