[PATCH v6] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
Hi Philipp, On 09/16/2016 06:21 PM, Philipp Zabel wrote: > Hi Vladimir, > > Am Mittwoch, den 14.09.2016, 21:46 +0300 schrieb Vladimir Zapolskiy: >> Hi Philipp, >> >> On 08/29/2016 06:50 PM, Rob Herring wrote: >>> On Wed, Aug 24, 2016 at 08:46:37AM +0300, Vladimir Zapolskiy wrote: The change adds support of internal HDMI I2C master controller, this subdevice is used by default, if "ddc-i2c-bus" DT property is omitted. The main purpose of this functionality is to support reading EDID from an HDMI monitor on boards, which don't have an I2C bus connected to DDC pins. The current implementation does not support "I2C Master Interface Extended Read Mode" to read data addressed by non-zero segment pointer, this means that if EDID has more than 1 extension blocks, EDID reading operation won't succeed, in my practice all tested HDMI monitors have at maximum one extension block. Signed-off-by: Vladimir Zapolskiy --- The change is based on top of v4.8.0-rc1 and a fix in DW HDMI driver https://patchwork.kernel.org/patch/9284717/ Changes from v5 to v6: * rebased on top of v4.8.0-rc1 * fixed one improper resource deallocation on error path of dw_hdmi_bind() * added a comment describing a mutex asked by checkpatch.pl --strict Link to version v5: https://patchwork.kernel.org/patch/7279831/ Changes from v4 to v5: * do I2C bus controller initialization only once in bind() as it was done in v1-v3 of the change. Changes from v3 to v4, thanks to Doug and Philipp for review: * set speed mode after software reset in dw_hdmi_i2c_init() * by default set standard speed mode instead of fast speed mode, on iMX6Q this configures SCL to 100 KHz, which is compliant with HDMI 1.3a spec * do I2C bus controller reinitialization on every data transfer, this change hopefully solves some observed problems on RK3288 platform * added short functional change description to dw_hdmi.txt v3 of the change was Tested-by: Philipp Zabel Changes from v2 to v3, thanks to Russell: * moved register field value definitions to dw_hdmi.h * made completions uninterruptible to avoid transfer retries if interrupted * use one completion for both read and write transfers as in v1, operation_reg is removed * redundant i2c->stat = 0 is removed from dw_hdmi_i2c_read/write() * struct i2c_algorithm dw_hdmi_algorithm is qualified as const * dw_hdmi_i2c_adapter() does not modify struct dw_hdmi on error path * dw_hdmi_i2c_irq() does not modify hdmi->i2c->stat, if interrupt is not for I2CM * spin lock is removed from dw_hdmi_i2c_irq() * removed spin lock from dw_hdmi_i2c_xfer() around write to HDMI_IH_MUTE_I2CM_STAT0 register * split loop over message array in dw_hdmi_i2c_xfer() to validation and transfer parts * added a mutex to serialize I2C transfer requests, i2c->lock is completely removed * removed if(len) check from dw_hdmi_i2c_write(), hardware supports only len>0 transfers * described extension blocks <= 1 limitation in the commit message * a number of minor clean ups Changes from v1 to v2: * fixed a devm_kfree() signature * split completions for read and write operations .../devicetree/bindings/display/bridge/dw_hdmi.txt | 4 +- >>> >>> Acked-by: Rob Herring >>> drivers/gpu/drm/bridge/dw-hdmi.c | 265 - drivers/gpu/drm/bridge/dw-hdmi.h | 19 ++ 3 files changed, 281 insertions(+), 7 deletions(-) >> >> as far as I know David accepts pull requests from you, can you please >> create and send a pull request for v4.9 containing these changes? >> >> https://patchwork.kernel.org/patch/9284717/ -- with Russell's ack > > Is that a forward looking statement? I don't see Russell's ack. Here it is: http://www.spinics.net/lists/dri-devel/msg115880.html Please don't bother about two other commits from that series, at least there are official maintainers for the changes. And by the way please consider to add youself as a maintainer of DW HDMI. >> https://patchwork.kernel.org/patch/9296883/ -- with Rob's ack and yours >> tested-by >> >> Some users anticipate this change, for example see >> https://lkml.org/lkml/2016/9/14/55 > > Those I see. I can re-test and prepare a pull request. > Thank you in advance! -- With best wishes, Vladimir
[PATCH] drm/ttm: remove cpu_address member from ttm_tt
Patch 3d50d4dcb0 exposed the CPU address of DMA-allocated pages as returned by dma_alloc_coherent because Nouveau on Tegra needed it. This is not required anymore - as there were no other users for it, remove it and save some memory for everyone. Signed-off-by: Alexandre Courbot --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 -- drivers/gpu/drm/ttm/ttm_tt.c | 7 ++- include/drm/ttm/ttm_bo_driver.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index bef9f6feb635..cec4b4baa179 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -858,7 +858,6 @@ static int ttm_dma_pool_get_pages(struct dma_pool *pool, if (count) { d_page = list_first_entry(>free_list, struct dma_page, page_list); ttm->pages[index] = d_page->p; - ttm_dma->cpu_address[index] = d_page->vaddr; ttm_dma->dma_address[index] = d_page->dma; list_move_tail(_page->page_list, _dma->pages_list); r = 0; @@ -989,7 +988,6 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev) INIT_LIST_HEAD(_dma->pages_list); for (i = 0; i < ttm->num_pages; i++) { ttm->pages[i] = NULL; - ttm_dma->cpu_address[i] = 0; ttm_dma->dma_address[i] = 0; } diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index bc5aa573f466..aee3c00f836e 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -57,10 +57,8 @@ static void ttm_dma_tt_alloc_page_directory(struct ttm_dma_tt *ttm) { ttm->ttm.pages = drm_calloc_large(ttm->ttm.num_pages, sizeof(*ttm->ttm.pages) + - sizeof(*ttm->dma_address) + - sizeof(*ttm->cpu_address)); - ttm->cpu_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); - ttm->dma_address = (void *) (ttm->cpu_address + ttm->ttm.num_pages); + sizeof(*ttm->dma_address)); + ttm->dma_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); } #ifdef CONFIG_X86 @@ -244,7 +242,6 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) drm_free_large(ttm->pages); ttm->pages = NULL; - ttm_dma->cpu_address = NULL; ttm_dma->dma_address = NULL; } EXPORT_SYMBOL(ttm_dma_tt_fini); diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index c986fa7effd2..4f0a92185995 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -133,7 +133,6 @@ struct ttm_tt { * struct ttm_dma_tt * * @ttm: Base ttm_tt struct. - * @cpu_address: The CPU address of the pages * @dma_address: The DMA (bus) addresses of the pages * @pages_list: used by some page allocation backend * @@ -143,7 +142,6 @@ struct ttm_tt { */ struct ttm_dma_tt { struct ttm_tt ttm; - void **cpu_address; dma_addr_t *dma_address; struct list_head pages_list; }; -- 2.9.3
[PATCH] drm/rockchip: Respect page offset for PRIME mmap calls
From: Ãrjan EideWhen mapping external DMA-bufs through the PRIME mmap call, we might be given an offset which has to be respected. However for the internal DRM GEM mmap path, we have to ignore the fake mmap offset used to identify the buffer only. Currently the code always zeroes out vma->vm_pgoff, which breaks the former. This patch fixes the problem by moving the vm_pgoff assignment to a function that is used only for GEM mmap path, so that the PRIME path retains the original offset. Fixes: a8594f2 ("drm/rockchip: unset pgoff when mmap'ing gems") Signed-off-by: Ãrjan Eide Signed-off-by: Tomasz Figa Cc: stable at vger.kernel.org --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index b70f942..cab4d60 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -64,7 +64,6 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj, * VM_PFNMAP flag that was set by drm_gem_mmap_obj()/drm_gem_mmap(). */ vma->vm_flags &= ~VM_PFNMAP; - vma->vm_pgoff = 0; ret = dma_mmap_attrs(drm->dev, vma, rk_obj->kvaddr, rk_obj->dma_addr, obj->size, rk_obj->dma_attrs); @@ -96,6 +95,12 @@ int rockchip_gem_mmap(struct file *filp, struct vm_area_struct *vma) if (ret) return ret; + /* +* Set vm_pgoff (used as a fake buffer offset by DRM) to 0 and map the +* whole buffer from the start. +*/ + vma->vm_pgoff = 0; + obj = vma->vm_private_data; return rockchip_drm_gem_object_mmap(obj, vma); -- 2.8.0.rc3.226.g39d4020
[pull] radeon and amdgpu drm-next-4.9
On Fri, Sep 16, 2016 at 5:38 PM, Lukas Wunner wrote: > On Fri, Sep 16, 2016 at 04:42:43PM -0400, Alex Deucher wrote: >> drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF >> drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF > > Those two are unnecessary, it can't happen that the ->suspend hook > is executed with the device runtime suspended. > > Since commit d14d2a8453d6 ("drm: Remove dev_pm_ops from drm_class"), > DRM devices are afforded direct_complete, i.e. if the GPU is runtime > suspended upon system sleep, it is left in this state. The only > callbacks that are executed are the ->prepare and the ->complete hook. > All the callbacks in-between, like ->suspend, are skipped. > > Even if direct_complete is not afforded for some reason, the PM core > will automatically runtime resume the device before executing ->suspend. > > That ->suspend is skipped in the DRM_SWITCH_POWER_OFF case was done > because the device is suspended behind the PM core's back if runpm=0 > is set. (And it doesn't work properly because the PCI core will > invalidate the saved_state during ->resume_noirq. That could be > solved by returning 1 from the ->prepare hook in the DRM_SWITCH_POWER_OFF > case, but that's a different story.) > > (Sorry for not raising this earlier, I'm not subscribed to amd-gfx.) Thanks for the heads up. They shouldn't hurt anything and it matches what other drivers do. If you feel strongly about it, I can revert them later. Alex > > Best regards, > > Lukas
[PATCH V2] drm/panel: simple: Fix bus flags for ortustech com43h4m85ulc
Hi Thierry, Am Freitag, den 16.09.2016, 17:17 +0200 schrieb Thierry Reding: > On Fri, Aug 26, 2016 at 06:26:00PM +0200, Marek Vasut wrote: > > This display expects DE pin and data lines to be active high, > > add the necessary flags. > > > > Signed-off-by: Marek Vasut > > Cc: Philipp Zabel > > Cc: Thierry Reding > > --- > > V2: Add DRM_BUS_FLAG_PIXDATA_POSEDGE to cater for the video data. > > --- > > drivers/gpu/drm/panel/panel-simple.c | 1 + > > 1 file changed, 1 insertion(+) > > Applied, thanks. I did add Philipp's Reviewed-by from v1, which I assume > would stand since he had suggested the PIXDATA_POSEDGE. I've Cc'ed him > now (it seems your v2 post didn't include him) so he can speak up if he > wants me to remove the Reviewed-by again. > > Thierry I received v2, just didn't think to re-assert the Reviewed-by. Thank you for bringing it to my attention, I agree with your deduction. regards Philipp
[PATCH v10 3/3] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
On Fri, Aug 26, 2016 at 08:07:07AM +0530, Vinay Simha BN wrote: > Add support for the JDI LT070ME05000 WUXGA DSI panel used in > Nexus 7 2013 devices. > > Programming sequence for the panel is was originally found in the > android-msm-flo-3.4-lollipop-release branch from: > https://android.googlesource.com/kernel/msm.git > > And video mode setting is from dsi-panel-jdi-dualmipi1-video.dtsi > file in: > git://codeaurora.org/kernel/msm-3.10.git LNX.LA.3.6_rb1.27 > > Cc: Archit Taneja > Cc: Rob Clark > Cc: Sumit Semwal > Cc: John Stultz > Cc: Emil Velikov > Cc: Thierry Reding > Cc: David Airlie > Signed-off-by: Sumit Semwal > Signed-off-by: John Stultz > Signed-off-by: Vinay Simha BN > Tested-by: John Stultz > Reviewed-by: Emil Velikov > > --- > v1: > * sumit ported to drm/panel framework, john cherry-picked to mainline, >folded down other fixes from Vinay and Archit, vinay removed interface >setting cmd mode, video mode panel selected > > v2: > * incorporated code reviews from theiry, archit >code style, alphabetical soring in Makefile, Kconfig, regulator_bulk, >arrays of u8, generic helper function, documentation bindings, > > v3: > * dcs backlight support added > * tested this panel driver in nexus7 2013 device > > v4: > * backlight interface added in the panel driver > * incorporated width_mm and height_mm suggested by rob herring > > v5: > * theirry review comments incorporated >panel model naming consistent, alphabetical soring in Kconfig >Makefile, MAX_BRIGHTNESS dropped, regulator_names, parameterize >panel width and height, descprition for control display, cabc >and interface setting, temporary variable removed, consistent >error reporting and commit message > * removed tear on/off, scanline, since these are required only >for command mode panels > > v6: > * emil review comments incorporated >PANEL_NUM_REGULATORS dropped, return ret added at necessary >places, if checks dropped for backlight and gpios > > v7: > * emil review comments incorporated >added ARRAY_SIZE in struct, regulator_bulk_disable in poweroff, >gpios checks dropped. >some returns cannot be dropped, since drm panel framework return >type required. > > v8: > * emil review commnets incorporated for jdi_panel_unprepare, >dropped the returns (ref: panel-sharp-lq101r1sx01.c) and >for jdi_panel_prepare(panel_on) it does not return prematurely >and goes to poweroff if not success > * few dev_err's for panel_init > > v9: > * function drm_panel_create_dsi_backlight made as static > > v10: > * proper naming conventions and sequence wrt panel datasheet >(vddp-supply, iovcc-supply, > enable-gpios, reset-gpios, dcdc-en-gpios) > * GPIO_ACTIVE_LOW polarity logic for reset-gpios > --- > drivers/gpu/drm/panel/Kconfig | 11 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 532 > + > 3 files changed, 544 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-jdi-lt070me05000.c Applied, thanks. Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/01530db2/attachment-0001.sig>
[PATCH v4] dt-bindings: Add jdi lt070me05000 panel bindings
On Thu, Sep 08, 2016 at 10:44:22AM +0530, Vinay Simha BN wrote: > Add documentation for lt070me05000 panel > > Cc: Archit Taneja > Cc: John Stultz > Cc: Thierry Reding > Cc: Sumit Semwal > Signed-off-by: Vinay Simha BN > Acked-by: Rob Herring > > --- > v2: > * incorporated rob herring and thierry reviews >gpio to gpios, gpio to regulator using fixed regulators >and pwm backlight is removed, since it is controlled by >dcs commands > > v3: > * incorporated thierry reviews >- Added gpio polarity details for reset-gpios >- proper naming conventions and sequence wrt panel datasheet > (vddp-supply, iovcc-supply, > enable-gpios, reset-gpios, dcdc-en-gpios) > v4: > * pinctrl-names, pinctrl-0 removed, not required for >reset-gpios > --- > .../bindings/display/panel/jdi,lt070me05000.txt| 31 > ++ > 1 file changed, 31 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/display/panel/jdi,lt070me05000.txt Applied, with a modified commit message. Thanks, Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/f4bba582/attachment.sig>
[PATCH v6] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
Hi Vladimir, Am Mittwoch, den 14.09.2016, 21:46 +0300 schrieb Vladimir Zapolskiy: > Hi Philipp, > > On 08/29/2016 06:50 PM, Rob Herring wrote: > > On Wed, Aug 24, 2016 at 08:46:37AM +0300, Vladimir Zapolskiy wrote: > >> The change adds support of internal HDMI I2C master controller, this > >> subdevice is used by default, if "ddc-i2c-bus" DT property is omitted. > >> > >> The main purpose of this functionality is to support reading EDID from > >> an HDMI monitor on boards, which don't have an I2C bus connected to > >> DDC pins. > >> > >> The current implementation does not support "I2C Master Interface > >> Extended Read Mode" to read data addressed by non-zero segment > >> pointer, this means that if EDID has more than 1 extension blocks, > >> EDID reading operation won't succeed, in my practice all tested HDMI > >> monitors have at maximum one extension block. > >> > >> Signed-off-by: Vladimir Zapolskiy > >> --- > >> The change is based on top of v4.8.0-rc1 and a fix in DW HDMI driver > >> https://patchwork.kernel.org/patch/9284717/ > >> > >> Changes from v5 to v6: > >> * rebased on top of v4.8.0-rc1 > >> * fixed one improper resource deallocation on error path of dw_hdmi_bind() > >> * added a comment describing a mutex asked by checkpatch.pl --strict > >> > >> Link to version v5: https://patchwork.kernel.org/patch/7279831/ > >> > >> Changes from v4 to v5: > >> * do I2C bus controller initialization only once in bind() as it was done > >> in v1-v3 of the change. > >> > >> Changes from v3 to v4, thanks to Doug and Philipp for review: > >> * set speed mode after software reset in dw_hdmi_i2c_init() > >> * by default set standard speed mode instead of fast speed mode, on iMX6Q > >> this configures SCL to 100 KHz, which is compliant with HDMI 1.3a spec > >> * do I2C bus controller reinitialization on every data transfer, > >> this change hopefully solves some observed problems on RK3288 platform > >> * added short functional change description to dw_hdmi.txt > >> > >> v3 of the change was > >> > >> Tested-by: Philipp Zabel > >> > >> Changes from v2 to v3, thanks to Russell: > >> * moved register field value definitions to dw_hdmi.h > >> * made completions uninterruptible to avoid transfer retries if interrupted > >> * use one completion for both read and write transfers as in v1, > >> operation_reg is removed > >> * redundant i2c->stat = 0 is removed from dw_hdmi_i2c_read/write() > >> * struct i2c_algorithm dw_hdmi_algorithm is qualified as const > >> * dw_hdmi_i2c_adapter() does not modify struct dw_hdmi on error path > >> * dw_hdmi_i2c_irq() does not modify hdmi->i2c->stat, if interrupt is > >> not for I2CM > >> * spin lock is removed from dw_hdmi_i2c_irq() > >> * removed spin lock from dw_hdmi_i2c_xfer() around write to > >> HDMI_IH_MUTE_I2CM_STAT0 register > >> * split loop over message array in dw_hdmi_i2c_xfer() to validation > >> and transfer parts > >> * added a mutex to serialize I2C transfer requests, i2c->lock is > >> completely removed > >> * removed if(len) check from dw_hdmi_i2c_write(), hardware supports > >> only len>0 transfers > >> * described extension blocks <= 1 limitation in the commit message > >> * a number of minor clean ups > >> > >> Changes from v1 to v2: > >> * fixed a devm_kfree() signature > >> * split completions for read and write operations > >> > >> .../devicetree/bindings/display/bridge/dw_hdmi.txt | 4 +- > > > > Acked-by: Rob Herring > > > >> drivers/gpu/drm/bridge/dw-hdmi.c | 265 > >> - > >> drivers/gpu/drm/bridge/dw-hdmi.h | 19 ++ > >> 3 files changed, 281 insertions(+), 7 deletions(-) > > as far as I know David accepts pull requests from you, can you please > create and send a pull request for v4.9 containing these changes? > > https://patchwork.kernel.org/patch/9284717/ -- with Russell's ack Is that a forward looking statement? I don't see Russell's ack. > https://patchwork.kernel.org/patch/9296883/ -- with Rob's ack and yours > tested-by > > Some users anticipate this change, for example see > https://lkml.org/lkml/2016/9/14/55 Those I see. I can re-test and prepare a pull request. regards Philipp
[PATCH] drm/panel: simple: Fix bus_format for the Olimex LCD-OLinuXino-4.3TS
On Sun, Sep 11, 2016 at 08:46:55PM +1000, Jonathan Liu wrote: > The format is RGB888 not RGB666. > > Signed-off-by: Jonathan Liu > --- > drivers/gpu/drm/panel/panel-simple.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/d43cd622/attachment.sig>
[PATCH] drm/panel: simple-panel: add delay timings for Starry KR122EA0SRA
On Fri, Aug 26, 2016 at 02:32:14PM -0700, Brian Norris wrote: > Taking our cue from commit a42f6e3f8f03 ("drm/panel: simple: Add delay > timing for Sharp LQ123P1JX31"), let's add timings: > > .prepare = t1 + t3 > .enable = t7 > .unprepare = t11 + 12 > > Without this, the panel may not be given enough time to come up. > > Signed-off-by: Brian Norris > --- > drivers/gpu/drm/panel/panel-simple.c | 5 + > 1 file changed, 5 insertions(+) Applied, thanks. Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/8bf9b5c5/attachment.sig>
[PATCH V2] drm/panel: simple: Fix bus flags for ortustech com43h4m85ulc
On Fri, Aug 26, 2016 at 06:26:00PM +0200, Marek Vasut wrote: > This display expects DE pin and data lines to be active high, > add the necessary flags. > > Signed-off-by: Marek Vasut > Cc: Philipp Zabel > Cc: Thierry Reding > --- > V2: Add DRM_BUS_FLAG_PIXDATA_POSEDGE to cater for the video data. > --- > drivers/gpu/drm/panel/panel-simple.c | 1 + > 1 file changed, 1 insertion(+) Applied, thanks. I did add Philipp's Reviewed-by from v1, which I assume would stand since he had suggested the PIXDATA_POSEDGE. I've Cc'ed him now (it seems your v2 post didn't include him) so he can speak up if he wants me to remove the Reviewed-by again. Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/4d2133ae/attachment.sig>
[PATCH 1/3] ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node
On 09/16/2016 06:50 AM, Jyri Sarha wrote: [..] > + blue-and-red-wiring = "crossed"; Dumb question: Why is this a Linux generic property - does it make sense to have "blue-and-red-wiring" as a Linux generic property? I mean, it reminds me little of those movies "cut the blue or red wire to diffuse the bomb" ;) "The am335x-evm has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR". I mean, there has to be some sort of better description specific to lcdc if some product used yellow and green wires for the same signals crossed? -- Regards, Nishanth Menon
[PATCH] drm/panel: simple: Add Innolux G101ICE-L01 panel
On Mon, Aug 15, 2016 at 02:32:02PM +0200, Lucas Stach wrote: > From: Michael Olbrich > > This patch adds support for Innolux Corporation 10.1" G101ICE-L01 WXGA > (1280x800) LVDS panel to the simple-panel driver. > > Signed-off-by: Michael Olbrich > Signed-off-by: Lucas Stach > --- > .../bindings/display/panel/innolux,g101ice-l01.txt | 7 + > drivers/gpu/drm/panel/panel-simple.c | 31 > ++ > 2 files changed, 38 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/display/panel/innolux,g101ice-l01.txt It would've been good to get an Acked-by on the bindings from Rob, but you hadn't included the devicetree mailing list, so they probably missed this. No biggie, though, this is very standard, so I just went ahead and applied. Thanks, Thierry -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/c9414f5f/attachment-0001.sig>
[pull] radeon and amdgpu drm-next-4.9
Hi Dave, More radeon and amdgpu changes for 4.9. Highlights: - Initial SI support for amdgpu (controlled by a Kconfig option) - misc ttm cleanups - runtimepm fixes - S3/S4 fixes - power improvements - lots of code cleanups and optimizations The following changes since commit 7b4d3e297e8a7d3b82e68231ff077e891c370349: drm/amdgpu: use memcpy_toio for VCE firmware upload (2016-08-24 16:25:07 -0400) are available in the git repository at: git://people.freedesktop.org/~agd5f/linux drm-next-4.9 for you to fetch changes up to af1f85ddecfa341e684db950c34a1813d36750db: drm/ttm: remove cpu_address member from ttm_tt (2016-09-16 15:53:05 -0400) Alex Deucher (39): drm/amdgpu: rename suspend_kms and resume_kms drm/amdgpu: track the number of vce rings drm/amdgpu/vce3: add support for third vce ring drm/amdgpu/si: Add updated smc firmware for SI kickers drm/amdgpu/gfx6: drop some dead code drm/amdgpu: set runtime pm state to active on resume drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF drm/radeon: set runtime pm state to active on resume drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF drm/amdgpu: handle runtime pm correctly in amdgpu_driver_open_kms drm/radeon: handle runtime pm correctly in amdgpu_driver_open_kms drm/amdgpu: handle runtime pm in drm pre/post close drm/radeon: handle runtime pm in drm pre/post close drm/amdgpu: wire up a pci shutdown callback drm/radeon: wire up a pci shutdown callback drm/amdgpu/si/dpm: make a bunch of things static drm/amdgpu/si/dpm: fix symbol conflicts with radeon drm/amdgpu: handle runtime pm in fbcon (v2) drm/radeon: handle runtime pm in fbcon (v2) drm/amdgpu/si: fix ring size for compute drm/amdgpu/gfx6: drop duplicate code drm/amdgpu/gfx6: add ring_emit_cntxcntl drm/amdgpu/gfx6: drop gds_switch callback drm/amdgpu/sdma3: drop unused functions drm/amdgpu/ring: add an interface to get dma frame and ib size drm/amdgpu/gfx6: add ring callbacks for ib and dma frame size drm/amdgpu/gfx7: add ring callbacks for ib and dma frame size drm/amdgpu/gfx8: add ring callbacks for ib and dma frame size drm/amdgpu/si_dma: add ring callbacks for ib and dma frame size drm/amdgpu/cik_sdma: add ring callbacks for ib and dma frame size drm/amdgpu/sdma2.4: add ring callbacks for ib and dma frame size drm/amdgpu/sdma3: add ring callbacks for ib and dma frame size drm/amdgpu/uvd4.2: add ring callbacks for ib and dma frame size drm/amdgpu/uvd5: add ring callbacks for ib and dma frame size drm/amdgpu/uvd6: add ring callbacks for ib and dma frame size drm/amdgpu/vce: add common ring callbacks for ib and dma frame size drm/amdgpu/vce2: add ring callbacks for ib and dma frame size drm/amdgpu/vce3: add ring callbacks for ib and dma frame size drm/amdgpu: use the new ring ib and dma frame size callbacks (v2) Alexandre Courbot (1): drm/ttm: remove cpu_address member from ttm_tt Baoyou Xie (6): drm/amdgpu: add missing header dependencies drm/amdgpu: mark symbols static where possible drm/amd/powerplay/fiji: mark symbols static where possible drm/amd/powerplay/polaris10: mark symbols static where possible drm/amdgpu: clean function declarations in amdgpu_ttm.c up drm/radeon/radeon_device: remove unused function Christian König (13): drm/amdgpu: only try again if we actually run into -ENOMEM drm/amdgpu: prevent command submission failures under memory pressure v2 drm/amdgpu: fix GTT offset handling drm/amdgpu: bind GTT on demand drm/ttm: use ffs in ttm_mem_type_from_place drm/ttm: rework handling of private mem types drm/ttm: remove unused placement flags drm/ttm: move placement structures into ttm_placement.h drm/amdgpu: validate size and offset of user fence BO drm/amdgpu: add AMDGPU_BO_INVALID_OFFSET drm/amdgpu: unbind GTT only when it is bound drm/amdgpu: use explicit GTT limit for evictions drm/amdgpu: use explicit limit for VRAM<->GTT moves Chunming Zhou (2): drm/amdgpu: link all gtt when binding them V2 drm/amdgpu: add gart recovery by gtt list V2 Edward O'Callaghan (1): amd/powerplay: use kmemdup instead of kmalloc + memcpy Flora Cui (1): drm/amdgpu: update gart_pin_size if bo is in GTT Huang Rui (5): drm/amdgpu: introduce pcie port read/write entry drm/amdgpu: use DRM print instead of printk drm/amdgpu: move some release handles into fail labels (v2) drm: modify drm_global_item_ref to avoid two times of writing ref->object drm/amdgpu: use error label to handle exceptional case Jordan Lazare (2): drm/amd/powerplay: Remove unused variable causing compile warning
[git pull] drm fixes for 4.8-rc6
On Fri, Sep 16, 2016 at 3:15 PM, Dave Airlie wrote: > > I've sent this from my gmail address to see if I can avoid > the spam folders. You were successful. Thanks, Linus
[PATCH 2/2 v4] drm/bridge: adv7511: Enable the audio data and clock pads on adv7533
From: Srinivas KandagatlaThis patch enables the Audio Data and Clock pads to the adv7533 bridge. Without this patch audio can not be played. Cc: David Airlie Cc: Archit Taneja Cc: Laurent Pinchart Cc: Wolfram Sang Cc: Srinivas Kandagatla Cc: "Ville Syrjälä" Cc: Boris Brezillon Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Zhangfei Gao Cc: Mark Brown Cc: Lars-Peter Clausen Cc: Jose Abreu Cc: dri-devel at lists.freedesktop.org Signed-off-by: Srinivas Kandagatla Signed-off-by: John Stultz --- drivers/gpu/drm/bridge/adv7511/adv7533.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c index 5eebd15..6798ecf 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c @@ -29,6 +29,7 @@ static const struct reg_sequence adv7533_cec_fixed_registers[] = { { 0x17, 0xd0 }, { 0x24, 0x20 }, { 0x57, 0x11 }, + { 0x05, 0xc8 }, }; static const struct regmap_config adv7533_cec_regmap_config = { -- 1.9.1
[PATCH 1/2 v4] drm/bridge: adv7511: Add Audio support.
This patch adds support to Audio for both adv7511 and adv7533 bridge chips. This patch was originally from [1] by Lars-Peter Clausen and was adapted by Archit Taneja and Srinivas Kandagatla . Then I heavily reworked it to use the hdmi-codec driver. And also folded in some audio packet initialization done by Andy Green . So credit to them, but blame to me. [1] https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/gpu/drm/i2c/adv7511_audio.c Cc: David Airlie Cc: Archit Taneja Cc: Laurent Pinchart Cc: Wolfram SangCc: Srinivas Kandagatla Cc: "Ville Syrjälä" Cc: Boris Brezillon Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Zhangfei Gao Cc: Mark Brown Cc: Lars-Peter Clausen Cc: Jose Abreu Cc: dri-devel at lists.freedesktop.org Acked-by: Lars-Peter Clausen Signed-off-by: John Stultz --- v4: * Kconfig tweaks suggested by Lars-Peter Clausen v3: * Allowed audio support to be configured in or out, as suggested by Laurent * Minor cleanups suggested by Laurent * Folded in Andy's audio packet initialization patch, as suggested by Archit drivers/gpu/drm/bridge/adv7511/Kconfig | 8 + drivers/gpu/drm/bridge/adv7511/Makefile| 1 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 16 ++ drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 213 + drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 + 5 files changed, 242 insertions(+) create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c diff --git a/drivers/gpu/drm/bridge/adv7511/Kconfig b/drivers/gpu/drm/bridge/adv7511/Kconfig index d2b0499..2fed567 100644 --- a/drivers/gpu/drm/bridge/adv7511/Kconfig +++ b/drivers/gpu/drm/bridge/adv7511/Kconfig @@ -6,6 +6,14 @@ config DRM_I2C_ADV7511 help Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. +config DRM_I2C_ADV7511_AUDIO + bool "ADV7511 HDMI Audio driver" + depends on DRM_I2C_ADV7511 && SND_SOC + select SND_SOC_HDMI_CODEC + help + Support the ADV7511 HDMI Audio interface. This is used in + conjunction with the AV7511 HDMI driver. + config DRM_I2C_ADV7533 bool "ADV7533 encoder" depends on DRM_I2C_ADV7511 diff --git a/drivers/gpu/drm/bridge/adv7511/Makefile b/drivers/gpu/drm/bridge/adv7511/Makefile index 9019327..5ba6755 100644 --- a/drivers/gpu/drm/bridge/adv7511/Makefile +++ b/drivers/gpu/drm/bridge/adv7511/Makefile @@ -1,3 +1,4 @@ adv7511-y := adv7511_drv.o +adv7511-$(CONFIG_DRM_I2C_ADV7511_AUDIO) += adv7511_audio.o adv7511-$(CONFIG_DRM_I2C_ADV7533) += adv7533.o obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511.o diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 161c923..992d76c 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h @@ -309,6 +309,8 @@ struct adv7511 { struct drm_display_mode curr_mode; unsigned int f_tmds; + unsigned int f_audio; + unsigned int audio_source; unsigned int current_edid_segment; uint8_t edid_buf[256]; @@ -334,6 +336,7 @@ struct adv7511 { bool use_timing_gen; enum adv7511_type type; + struct platform_device *audio_pdev; }; #ifdef CONFIG_DRM_I2C_ADV7533 @@ -389,4 +392,17 @@ static inline int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv) } #endif +#ifdef CONFIG_DRM_I2C_ADV7511_AUDIO +int adv7511_audio_init(struct device *dev, struct adv7511 *adv7511); +void adv7511_audio_exit(struct adv7511 *adv7511); +#else /*CONFIG_DRM_I2C_ADV7511_AUDIO */ +static inline int adv7511_audio_init(struct device *dev, struct adv7511 *adv7511) +{ + return 0; +} +static inline void adv7511_audio_exit(struct adv7511 *adv7511) +{ +} +#endif /* CONFIG_DRM_I2C_ADV7511_AUDIO */ + #endif /* __DRM_I2C_ADV7511_H__ */ diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c new file mode 100644 index 000..5ce29a5 --- /dev/null +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c @@ -0,0 +1,213 @@ +/* + * Analog Devices ADV7511 HDMI transmitter driver + * + * Copyright 2012 Analog Devices Inc. + * Copyright (c) 2016, Linaro Limited + * + * Licensed under the GPL-2. + */ + +#include +#include +#include +#include + +#include "adv7511.h" + +static void adv7511_calc_cts_n(unsigned int f_tmds, unsigned int fs, + unsigned int *cts, unsigned int *n) +{ + switch (fs) { + case 32000: + *n = 4096; + break; + case 44100: + *n = 6272; + break; + case 48000: + *n = 6144; + break; + } + + *cts = ((f_tmds * *n) / (128 * fs)) * 1000; +} + +static int adv7511_update_cts_n(struct adv7511 *adv7511) +{ + unsigned int cts = 0; + unsigned int n = 0; + + adv7511_calc_cts_n(adv7511->f_tmds, adv7511->f_audio, ,
[PATCH 0/2 v4] Audio support for adv7511 hdmi bridge
Yet another pass on adding audio support to the adv7511 hdmi bridge. I've taken the core audio work done by Lars-Peter Clausen, and adapted by Srinivas Kandagatla and Archit Taneja, and tried to rework it to use the hdmi-codec sound driver. This patchset, along with the i2s driver and dts changes allows HDMI audio to work on the HiKey board. I'd really appreciate any thoughts or feedback. New in v4: * Kconfig tweaks suggested by Lars-Peter Clausen thanks -john Cc: David Airlie Cc: Archit Taneja Cc: Laurent Pinchart Cc: Wolfram SangCc: Srinivas Kandagatla Cc: "Ville Syrjälä" Cc: Boris Brezillon Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Zhangfei Gao Cc: Mark Brown Cc: Lars-Peter Clausen Cc: Jose Abreu Cc: dri-devel at lists.freedesktop.org John Stultz (1): drm/bridge: adv7511: Add Audio support. Srinivas Kandagatla (1): drm/bridge: adv7511: Enable the audio data and clock pads on adv7533 drivers/gpu/drm/bridge/adv7511/Kconfig | 8 + drivers/gpu/drm/bridge/adv7511/Makefile| 1 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 16 ++ drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 213 + drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 + drivers/gpu/drm/bridge/adv7511/adv7533.c | 1 + 6 files changed, 243 insertions(+) create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c -- 1.9.1
[PATCH v4 3/4] gpu: ipu-ic: Add complete image conversion support with tiling
Hi Steve, thanks for the update. Am Mittwoch, den 14.09.2016, 18:45 -0700 schrieb Steve Longerbeam: > Hi Philipp, > > > On 09/06/2016 02:26 AM, Philipp Zabel wrote: > > Hi Steve, > > > > Am Mittwoch, den 17.08.2016, 17:50 -0700 schrieb Steve Longerbeam: > >> This patch implements complete image conversion support to ipu-ic, > >> with tiling to support scaling to and from images up to 4096x4096. > >> Image rotation is also supported. > >> > >> The internal API is subsystem agnostic (no V4L2 dependency except > >> for the use of V4L2 fourcc pixel formats). > >> > >> Callers prepare for image conversion by calling > >> ipu_image_convert_prepare(), which initializes the parameters of > >> the conversion. > > ... and possibly allocates intermediate buffers for rotation support. > > This should be documented somewhere, with a node that v4l2 users should > > be doing this during REQBUFS. > > I added comment headers for all the image conversion prototypes. > It caused bloat in imx-ipu-v3.h, so I moved it to a new header: > include/video/imx-image-convert.h, but let me know if we should put > this somewhere else and/or under Documentation/ somewhere. I think that is the right place already. imx-image-convert.h could be renamed to imx-ipu-image-convert.h, to make clear that this is about the IPU image converter. > >> The caller passes in the ipu_ic task to use for > >> the conversion, the input and output image formats, a rotation mode, > >> and a completion callback and completion context pointer: > >> > >> struct image_converter_ctx * > >> ipu_image_convert_prepare(struct ipu_ic *ic, > >>struct ipu_image *in, struct ipu_image *out, > >>enum ipu_rotate_mode rot_mode, > >>image_converter_cb_t complete, > >>void *complete_context); > > As I commented on the other patch, I think the image_convert functions > > should use a separate handle for the image conversion queues that sit on > > top of the ipu_ic task handles. > > Here is a new prototype I came up with: > > struct ipu_image_convert_ctx * > ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task, >struct ipu_image *in, struct ipu_image *out, >enum ipu_rotate_mode rot_mode, >ipu_image_convert_cb_t complete, >void *complete_context); > > In other words, the ipu_ic handle is replaced by the IPU handle and IC task > that are requested for carrying out the conversion. Looks good to me for now. > The image converter will acquire the ipu_ic handle internally, whenever > there > are queued contexts to that IC task (which I am calling a 'struct > ipu_image_convert_chan'). > This way the IC handle can be shared by all contexts using that IC task. > After all > contexts have been freed from the (struct > ipu_image_convert_chan)->ctx_list queue, > the ipu_ic handle is freed. > > The ipu_ic handle is acquired in get_ipu_resources() and freed in > release_ipu_resources(), > along with all the other IPU resources that *could possibly be needed* > in that > ipu_image_convert_chan by future contexts (*all* idmac channels, *all* > irqs). Ok. [...] > >> +#define MIN_W 128 > >> +#define MIN_H 128 > > Where does this minimum come from? > > Nowhere really :) This is just some sane minimums, to pass > to clamp_align() when aligning input/output width/height in > ipu_image_convert_adjust(). Let's use hardware minimum in the low level code. Sane defaults are for the V4L2 API. Would that be 8x2 pixels per input tile? > >> +struct ic_task_channels { > >> + int in; > >> + int out; > >> + int rot_in; > >> + int rot_out; > >> + int vdi_in_p; > >> + int vdi_in; > >> + int vdi_in_n; > > The vdi channels are unused. > > Well, I'd prefer to keep the VDI channels. It's quite possible we > can add motion compensated deinterlacing support using the > PRP_VF task to the image converter in the future. Indeed. > >> +struct image_converter_ctx { > >> + struct image_converter *cvt; > >> + > >> + image_converter_cb_t complete; > >> + void *complete_context; > >> + > >> + /* Source/destination image data and rotation mode */ > >> + struct ipu_ic_image in; > >> + struct ipu_ic_image out; > >> + enum ipu_rotate_mode rot_mode; > >> + > >> + /* intermediate buffer for rotation */ > >> + struct ipu_ic_dma_buf rot_intermediate[2]; > > No need to change it now, but I assume these could be per IC task > > instead of per context. > > Actually no. The rotation intermediate buffers have the dimension > of a single tile, so they must remain in the context struct. I see. The per task intermediate buffer would have to be the maximum size, so this would only ever make sense when rotating multiple large RGB streams simultaneously. I think we can reasonably ignore this use case. [...] > >> + .fourcc = V4L2_PIX_FMT_RGB565, > >> + .bpp= 16, > > bpp is only
[PATCH 1/2 v3] drm/bridge: adv7511: Add Audio support.
On Fri, Sep 16, 2016 at 3:51 AM, Lars-Peter Clausen wrote: > On 09/07/2016 01:22 AM, John Stultz wrote: >> This patch adds support to Audio for both adv7511 and adv7533 >> bridge chips. >> >> This patch was originally from [1] by Lars-Peter Clausen >> and was adapted by Archit Taneja and >> Srinivas Kandagatla . >> >> Then I heavily reworked it to use the hdmi-codec driver. And also >> folded in some audio packet initialization done by Andy Green >> . So credit to them, but blame to me. >> >> [1] >> https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/gpu/drm/i2c/adv7511_audio.c >> >> Cc: David Airlie >> Cc: Archit Taneja >> Cc: Laurent Pinchart >> Cc: Wolfram Sang>> Cc: Srinivas Kandagatla >> Cc: "Ville Syrjälä" >> Cc: Boris Brezillon >> Cc: Andy Green >> Cc: Dave Long >> Cc: Guodong Xu >> Cc: Zhangfei Gao >> Cc: Mark Brown >> Cc: Lars-Peter Clausen >> Cc: Jose Abreu >> Cc: dri-devel at lists.freedesktop.org >> Signed-off-by: John Stultz > > I'm not to fond of the hdmi-codec stuff, but within its context this looks > ok. Thanks for getting this upstream ready. Just one tiny bit regarding the > Kconfig entry. > > If that is fixed feel free to add on the next revision: > > Acked-by: Lars-Peter Clausen > >> --- >> v3: >> * Allowed audio support to be configured in or out, as suggested by Laurent >> * Minor cleanups suggested by Laurent >> * Folded in Andy's audio packet initialization patch, as suggested by Archit >> >> drivers/gpu/drm/bridge/adv7511/Kconfig | 9 ++ >> drivers/gpu/drm/bridge/adv7511/Makefile| 1 + >> drivers/gpu/drm/bridge/adv7511/adv7511.h | 16 ++ >> drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 213 >> + >> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 + >> 5 files changed, 243 insertions(+) >> create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c >> >> diff --git a/drivers/gpu/drm/bridge/adv7511/Kconfig >> b/drivers/gpu/drm/bridge/adv7511/Kconfig >> index d2b0499..b303ad1 100644 >> --- a/drivers/gpu/drm/bridge/adv7511/Kconfig >> +++ b/drivers/gpu/drm/bridge/adv7511/Kconfig >> @@ -3,9 +3,18 @@ config DRM_I2C_ADV7511 >> depends on OF >> select DRM_KMS_HELPER >> select REGMAP_I2C >> + select SND_SOC_HDMI_CODEC if SND_SOC > > This seems to be redundant considering the select done by > DRM_I2C_ADV7511_AUDIO. > >> help >> Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. >> >> +config DRM_I2C_ADV7511_AUDIO >> + tristate "ADV7511 HDMI Audio driver" > > This should be bool. It either gets built into the ADV7511 driver (which > itself could either be a module or built-in) or not. But setting this option > itself to module wont work. Ah! Thanks for the catch here! I really appreciate the feedback! I'll integrate those changes and respin the patch here shortly! thanks -john
[Bug 92806] 1 second freezes during new effects UT4
https://bugs.freedesktop.org/show_bug.cgi?id=92806 --- Comment #14 from Nicolai Hähnle --- You need at least LLVM 3.8 (and Mesa re-built to link against it) to benefit from the existing shader improvements. A full shader cache is still missing -- 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/20160916/d8de28e9/attachment.html>
[Bug 92806] 1 second freezes during new effects UT4
https://bugs.freedesktop.org/show_bug.cgi?id=92806 --- Comment #13 from famo --- Can someon explain when (where) the updates land? Because I can't see any improvement here: Kernel: 4.5.7-1-CHAKRA x86_64 (64 bit) Graphics: Card: Advanced Micro Devices [AMD/ATI] Bonaire XTX [Radeon R7 260X] Display Server: X.Org 1.17.4 driver: radeon GLX Renderer: Gallium 0.4 on AMD BONAIRE (DRM 2.43.0 / 4.5.7-1-CHAKRA, LLVM 3.7.0) GLX Version: 3.0 Mesa 12.0.1 ty -- 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/20160916/319e8cf5/attachment.html>
[RFC PATCH] drm/exynos: fix pending update handling
On 16.09.2016 15:27, Tobias Jakobi wrote: > Hello everyone, > > any update on this issue? I can see that the old/custom wait-for-vblank > code is still in place. > > Andrzej mentioned that this patch is quick/dirty, but isn't using DRM > core functionality actually the better approach? Thanks for pinging the problem. As the patch changes exynos-drm core, it can influence all exynos crtc drivers. These drivers requires review and testing. I will look at them to verify if the patch does not introduce regression. Regards Andrzej > > With best wishes, > Tobias > > > Andrzej Hajda wrote: >> Exynos DRM devices update their registers at vblank time. Exynos-DRM uses >> custom mechanism to wait for vblank. This mechanism is error prone - >> variables are not updated atomically. As a result in certain circumstances >> user space can try to free buffers which are still in use by hardware, >> in such cases IOMMU can throw OOPS. >> The patch instead of fixing the mechanism replaces it with drm core helper. >> >> Signed-off-by: Andrzej Hajda >> --- >> Hi Tobias, >> >> This is a quick/dirty patch just for checking if it solves your issue. >> Successfully tested on decon5433/dsi/i80 path. >> >> Please verify if it helps in your case. >> >> The patch is based on exynos-drm-next and >> "drm/exynos: fix cancel page flip code" [1]. >> >> [1]: http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/53801 >> >> Regards >> Andrzej >> --- >> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 16 +--- >> drivers/gpu/drm/exynos/exynos_drm_drv.c | 44 >> +--- >> drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- >> 3 files changed, 2 insertions(+), 60 deletions(-) >> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c >> b/drivers/gpu/drm/exynos/exynos_drm_crtc.c >> index 785ffa6..5b6845b 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c >> @@ -134,8 +134,6 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct >> drm_device *drm_dev, >> exynos_crtc->ops = ops; >> exynos_crtc->ctx = ctx; >> >> -init_waitqueue_head(_crtc->wait_update); >> - >> crtc = _crtc->base; >> >> private->crtc[pipe] = crtc; >> @@ -175,13 +173,6 @@ void exynos_drm_crtc_disable_vblank(struct drm_device >> *dev, unsigned int pipe) >> exynos_crtc->ops->disable_vblank(exynos_crtc); >> } >> >> -void exynos_drm_crtc_wait_pending_update(struct exynos_drm_crtc >> *exynos_crtc) >> -{ >> -wait_event_timeout(exynos_crtc->wait_update, >> - (atomic_read(_crtc->pending_update) == 0), >> - msecs_to_jiffies(50)); >> -} >> - >> void exynos_drm_crtc_finish_update(struct exynos_drm_crtc *exynos_crtc, >> struct exynos_drm_plane *exynos_plane) >> { >> @@ -190,9 +181,6 @@ void exynos_drm_crtc_finish_update(struct >> exynos_drm_crtc *exynos_crtc, >> >> exynos_plane->pending_fb = NULL; >> >> -if (atomic_dec_and_test(_crtc->pending_update)) >> -wake_up(_crtc->wait_update); >> - >> spin_lock_irqsave(>dev->event_lock, flags); >> if (exynos_crtc->event) >> drm_crtc_send_vblank_event(crtc, exynos_crtc->event); >> @@ -235,10 +223,8 @@ void exynos_drm_crtc_cancel_page_flip(struct drm_crtc >> *crtc, >> spin_lock_irqsave(>dev->event_lock, flags); >> >> e = exynos_crtc->event; >> -if (e && e->base.file_priv == file) { >> +if (e && e->base.file_priv == file) >> exynos_crtc->event = NULL; >> -atomic_dec(_crtc->pending_update); >> -} >> >> spin_unlock_irqrestore(>dev->event_lock, flags); >> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c >> b/drivers/gpu/drm/exynos/exynos_drm_drv.c >> index 0281b30..cc96e85 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c >> @@ -45,37 +45,11 @@ struct exynos_atomic_commit { >> u32 crtcs; >> }; >> >> -static void exynos_atomic_wait_for_commit(struct drm_atomic_state *state) >> -{ >> -struct drm_crtc_state *crtc_state; >> -struct drm_crtc *crtc; >> -int i, ret; >> - >> -for_each_crtc_in_state(state, crtc, crtc_state, i) { >> -struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); >> - >> -if (!crtc->state->enable) >> -continue; >> - >> -ret = drm_crtc_vblank_get(crtc); >> -if (ret) >> -continue; >> - >> -exynos_drm_crtc_wait_pending_update(exynos_crtc); >> -drm_crtc_vblank_put(crtc); >> -} >> -} >> - >> static void exynos_atomic_commit_complete(struct exynos_atomic_commit >> *commit) >> { >> struct drm_device *dev = commit->dev; >> struct exynos_drm_private *priv = dev->dev_private; >> struct drm_atomic_state *state = commit->state; >> -struct drm_plane *plane; >> -struct drm_crtc
[PATCH] drm/ttm: remove cpu_address member from ttm_tt
On Fri, Sep 16, 2016 at 5:43 AM, Christian König wrote: > Am 16.09.2016 um 11:32 schrieb Alexandre Courbot: >> >> Patch 3d50d4dcb0 exposed the CPU address of DMA-allocated pages as >> returned by dma_alloc_coherent because Nouveau on Tegra needed it. >> >> This is not required anymore - as there were no other users for it, >> remove it and save some memory for everyone. >> >> Signed-off-by: Alexandre Courbot > > > Reviewed-by: Christian König . > > Applied. thanks! Alex >> --- >> drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 -- >> drivers/gpu/drm/ttm/ttm_tt.c | 7 ++- >> include/drm/ttm/ttm_bo_driver.h | 2 -- >> 3 files changed, 2 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c >> b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c >> index bef9f6feb635..cec4b4baa179 100644 >> --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c >> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c >> @@ -858,7 +858,6 @@ static int ttm_dma_pool_get_pages(struct dma_pool >> *pool, >> if (count) { >> d_page = list_first_entry(>free_list, struct >> dma_page, page_list); >> ttm->pages[index] = d_page->p; >> - ttm_dma->cpu_address[index] = d_page->vaddr; >> ttm_dma->dma_address[index] = d_page->dma; >> list_move_tail(_page->page_list, _dma->pages_list); >> r = 0; >> @@ -989,7 +988,6 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, >> struct device *dev) >> INIT_LIST_HEAD(_dma->pages_list); >> for (i = 0; i < ttm->num_pages; i++) { >> ttm->pages[i] = NULL; >> - ttm_dma->cpu_address[i] = 0; >> ttm_dma->dma_address[i] = 0; >> } >> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c >> index bc5aa573f466..aee3c00f836e 100644 >> --- a/drivers/gpu/drm/ttm/ttm_tt.c >> +++ b/drivers/gpu/drm/ttm/ttm_tt.c >> @@ -57,10 +57,8 @@ static void ttm_dma_tt_alloc_page_directory(struct >> ttm_dma_tt *ttm) >> { >> ttm->ttm.pages = drm_calloc_large(ttm->ttm.num_pages, >> sizeof(*ttm->ttm.pages) + >> - sizeof(*ttm->dma_address) + >> - sizeof(*ttm->cpu_address)); >> - ttm->cpu_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); >> - ttm->dma_address = (void *) (ttm->cpu_address + >> ttm->ttm.num_pages); >> + sizeof(*ttm->dma_address)); >> + ttm->dma_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); >> } >> #ifdef CONFIG_X86 >> @@ -244,7 +242,6 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) >> drm_free_large(ttm->pages); >> ttm->pages = NULL; >> - ttm_dma->cpu_address = NULL; >> ttm_dma->dma_address = NULL; >> } >> EXPORT_SYMBOL(ttm_dma_tt_fini); >> diff --git a/include/drm/ttm/ttm_bo_driver.h >> b/include/drm/ttm/ttm_bo_driver.h >> index c986fa7effd2..4f0a92185995 100644 >> --- a/include/drm/ttm/ttm_bo_driver.h >> +++ b/include/drm/ttm/ttm_bo_driver.h >> @@ -133,7 +133,6 @@ struct ttm_tt { >>* struct ttm_dma_tt >>* >>* @ttm: Base ttm_tt struct. >> - * @cpu_address: The CPU address of the pages >>* @dma_address: The DMA (bus) addresses of the pages >>* @pages_list: used by some page allocation backend >>* >> @@ -143,7 +142,6 @@ struct ttm_tt { >>*/ >> struct ttm_dma_tt { >> struct ttm_tt ttm; >> - void **cpu_address; >> dma_addr_t *dma_address; >> struct list_head pages_list; >> }; > > > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Intel-gfx] [PATCH v3 5/5] drm/i915: squash lines for simple wrapper functions
Hi Chris, 2016-09-16 15:15 GMT+09:00 Chris Wilson : > On Fri, Sep 16, 2016 at 10:40:23AM +0900, Masahiro Yamada wrote: >> Remove unneeded variables and assignments. >> >> Signed-off-by: Masahiro Yamada >> --- >> >> Changes in v3: >> - Keep the wrapper function. >> Cleanup of variables and assignments only. >> - Fix intel_engine_init_common() as well. >> >> drivers/gpu/drm/i915/i915_drv.c| 8 +--- >> drivers/gpu/drm/i915/intel_engine_cs.c | 8 +--- >> 2 files changed, 2 insertions(+), 14 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_drv.c >> b/drivers/gpu/drm/i915/i915_drv.c >> index 7f4e8ad..1503c88 100644 >> --- a/drivers/gpu/drm/i915/i915_drv.c >> +++ b/drivers/gpu/drm/i915/i915_drv.c >> @@ -1324,13 +1324,7 @@ void i915_driver_unload(struct drm_device *dev) >> >> static int i915_driver_open(struct drm_device *dev, struct drm_file *file) >> { >> - int ret; >> - >> - ret = i915_gem_open(dev, file); >> - if (ret) >> - return ret; >> - >> - return 0; >> + return i915_gem_open(dev, file); >> } >> >> /** >> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c >> b/drivers/gpu/drm/i915/intel_engine_cs.c >> index e405f10..ebb4bf8 100644 >> --- a/drivers/gpu/drm/i915/intel_engine_cs.c >> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c >> @@ -298,13 +298,7 @@ static void intel_engine_cleanup_scratch(struct >> intel_engine_cs *engine) >> */ >> int intel_engine_init_common(struct intel_engine_cs *engine) >> { >> - int ret; >> - >> - ret = intel_engine_init_breadcrumbs(engine); >> - if (ret) >> - return ret; >> - >> - return 0; >> + return intel_engine_init_breadcrumbs(engine); > > These are written like this for consistency and ease of change. > -Chris > OK, then please feel free to reject this patch. -- Best Regards Masahiro Yamada
[PATCH] drm/radeon/radeon_device: remove unused function
On Thu, Sep 15, 2016 at 1:44 PM, Christian König wrote: > Am 15.09.2016 um 16:13 schrieb Baoyou Xie: >> >> We get 2 warnings when building kernel with W=1: >> drivers/gpu/drm/radeon/radeon_device.c:1961:5: warning: no previous >> prototype for 'radeon_debugfs_init' [-Wmissing-prototypes] >> drivers/gpu/drm/radeon/radeon_device.c:1966:6: warning: no previous >> prototype for 'radeon_debugfs_cleanup' [-Wmissing-prototypes] >> >> In fact, these functions are dummy, but can be removed, >> so this patch removes them. >> >> Signed-off-by: Baoyou Xie > > > Reviewed-by: Christian König . > Applied. thanks! Alex > >> --- >> drivers/gpu/drm/radeon/radeon_device.c | 11 --- >> drivers/gpu/drm/radeon/radeon_drv.c| 9 - >> 2 files changed, 20 deletions(-) >> >> diff --git a/drivers/gpu/drm/radeon/radeon_device.c >> b/drivers/gpu/drm/radeon/radeon_device.c >> index a00dd2f..63447f1 100644 >> --- a/drivers/gpu/drm/radeon/radeon_device.c >> +++ b/drivers/gpu/drm/radeon/radeon_device.c >> @@ -1956,14 +1956,3 @@ static void radeon_debugfs_remove_files(struct >> radeon_device *rdev) >> } >> #endif >> } >> - >> -#if defined(CONFIG_DEBUG_FS) >> -int radeon_debugfs_init(struct drm_minor *minor) >> -{ >> - return 0; >> -} >> - >> -void radeon_debugfs_cleanup(struct drm_minor *minor) >> -{ >> -} >> -#endif >> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c >> b/drivers/gpu/drm/radeon/radeon_drv.c >> index 07e4493..86bab2e 100644 >> --- a/drivers/gpu/drm/radeon/radeon_drv.c >> +++ b/drivers/gpu/drm/radeon/radeon_drv.c >> @@ -156,11 +156,6 @@ void radeon_gem_prime_vunmap(struct drm_gem_object >> *obj, void *vaddr); >> extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, >> unsigned long arg); >> -#if defined(CONFIG_DEBUG_FS) >> -int radeon_debugfs_init(struct drm_minor *minor); >> -void radeon_debugfs_cleanup(struct drm_minor *minor); >> -#endif >> - >> /* atpx handler */ >> #if defined(CONFIG_VGA_SWITCHEROO) >> void radeon_register_atpx_handler(void); >> @@ -531,10 +526,6 @@ static struct drm_driver kms_driver = { >> .disable_vblank = radeon_disable_vblank_kms, >> .get_vblank_timestamp = radeon_get_vblank_timestamp_kms, >> .get_scanout_position = radeon_get_crtc_scanoutpos, >> -#if defined(CONFIG_DEBUG_FS) >> - .debugfs_init = radeon_debugfs_init, >> - .debugfs_cleanup = radeon_debugfs_cleanup, >> -#endif >> .irq_preinstall = radeon_driver_irq_preinstall_kms, >> .irq_postinstall = radeon_driver_irq_postinstall_kms, >> .irq_uninstall = radeon_driver_irq_uninstall_kms, > > > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up
On Thu, Sep 15, 2016 at 9:49 AM, Christian König wrote: > Am 15.09.2016 um 15:43 schrieb Baoyou Xie: >> >> We get 2 warnings when building kernel with W=1: >> >> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:985:5: warning: no previous >> prototype for 'amdgpu_ttm_init' [-Wmissing-prototypes] >> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1092:6: warning: no previous >> prototype for 'amdgpu_ttm_fini' [-Wmissing-prototypes] >> >> In fact, both functions are declared in >> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c, but should be declared in >> a header file, thus can be recognized in other file. >> >> So this patch moves the declarations into >> drivers/gpu/drm/amd/amdgpu/amdgpu.h. >> >> Signed-off-by: Baoyou Xie > > > Reviewed-by: Christian König . Applied. thanks! Alex > > >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ >> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 -- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> index a7bb862..3208608 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> @@ -2402,6 +2402,8 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, >> struct amdgpu_mc *mc); >> void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 >> size); >> u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev); >> int amdgpu_ttm_global_init(struct amdgpu_device *adev); >> +int amdgpu_ttm_init(struct amdgpu_device *adev); >> +void amdgpu_ttm_fini(struct amdgpu_device *adev); >> void amdgpu_program_register_sequence(struct amdgpu_device *adev, >> const u32 *registers, >> const u32 array_size); >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c >> index b17734e..30f05d8 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c >> @@ -38,8 +38,6 @@ >> #include "amdgpu_trace.h" >> -int amdgpu_ttm_init(struct amdgpu_device *adev); >> -void amdgpu_ttm_fini(struct amdgpu_device *adev); >> static u64 amdgpu_get_vis_part_size(struct amdgpu_device *adev, >> struct ttm_mem_reg *mem) > > > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
[RFC PATCH] drm/exynos: fix pending update handling
Hello everyone, any update on this issue? I can see that the old/custom wait-for-vblank code is still in place. Andrzej mentioned that this patch is quick/dirty, but isn't using DRM core functionality actually the better approach? With best wishes, Tobias Andrzej Hajda wrote: > Exynos DRM devices update their registers at vblank time. Exynos-DRM uses > custom mechanism to wait for vblank. This mechanism is error prone - > variables are not updated atomically. As a result in certain circumstances > user space can try to free buffers which are still in use by hardware, > in such cases IOMMU can throw OOPS. > The patch instead of fixing the mechanism replaces it with drm core helper. > > Signed-off-by: Andrzej Hajda > --- > Hi Tobias, > > This is a quick/dirty patch just for checking if it solves your issue. > Successfully tested on decon5433/dsi/i80 path. > > Please verify if it helps in your case. > > The patch is based on exynos-drm-next and > "drm/exynos: fix cancel page flip code" [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/53801 > > Regards > Andrzej > --- > drivers/gpu/drm/exynos/exynos_drm_crtc.c | 16 +--- > drivers/gpu/drm/exynos/exynos_drm_drv.c | 44 > +--- > drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- > 3 files changed, 2 insertions(+), 60 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c > b/drivers/gpu/drm/exynos/exynos_drm_crtc.c > index 785ffa6..5b6845b 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c > @@ -134,8 +134,6 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct > drm_device *drm_dev, > exynos_crtc->ops = ops; > exynos_crtc->ctx = ctx; > > - init_waitqueue_head(_crtc->wait_update); > - > crtc = _crtc->base; > > private->crtc[pipe] = crtc; > @@ -175,13 +173,6 @@ void exynos_drm_crtc_disable_vblank(struct drm_device > *dev, unsigned int pipe) > exynos_crtc->ops->disable_vblank(exynos_crtc); > } > > -void exynos_drm_crtc_wait_pending_update(struct exynos_drm_crtc *exynos_crtc) > -{ > - wait_event_timeout(exynos_crtc->wait_update, > -(atomic_read(_crtc->pending_update) == 0), > -msecs_to_jiffies(50)); > -} > - > void exynos_drm_crtc_finish_update(struct exynos_drm_crtc *exynos_crtc, > struct exynos_drm_plane *exynos_plane) > { > @@ -190,9 +181,6 @@ void exynos_drm_crtc_finish_update(struct exynos_drm_crtc > *exynos_crtc, > > exynos_plane->pending_fb = NULL; > > - if (atomic_dec_and_test(_crtc->pending_update)) > - wake_up(_crtc->wait_update); > - > spin_lock_irqsave(>dev->event_lock, flags); > if (exynos_crtc->event) > drm_crtc_send_vblank_event(crtc, exynos_crtc->event); > @@ -235,10 +223,8 @@ void exynos_drm_crtc_cancel_page_flip(struct drm_crtc > *crtc, > spin_lock_irqsave(>dev->event_lock, flags); > > e = exynos_crtc->event; > - if (e && e->base.file_priv == file) { > + if (e && e->base.file_priv == file) > exynos_crtc->event = NULL; > - atomic_dec(_crtc->pending_update); > - } > > spin_unlock_irqrestore(>dev->event_lock, flags); > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c > b/drivers/gpu/drm/exynos/exynos_drm_drv.c > index 0281b30..cc96e85 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c > @@ -45,37 +45,11 @@ struct exynos_atomic_commit { > u32 crtcs; > }; > > -static void exynos_atomic_wait_for_commit(struct drm_atomic_state *state) > -{ > - struct drm_crtc_state *crtc_state; > - struct drm_crtc *crtc; > - int i, ret; > - > - for_each_crtc_in_state(state, crtc, crtc_state, i) { > - struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); > - > - if (!crtc->state->enable) > - continue; > - > - ret = drm_crtc_vblank_get(crtc); > - if (ret) > - continue; > - > - exynos_drm_crtc_wait_pending_update(exynos_crtc); > - drm_crtc_vblank_put(crtc); > - } > -} > - > static void exynos_atomic_commit_complete(struct exynos_atomic_commit > *commit) > { > struct drm_device *dev = commit->dev; > struct exynos_drm_private *priv = dev->dev_private; > struct drm_atomic_state *state = commit->state; > - struct drm_plane *plane; > - struct drm_crtc *crtc; > - struct drm_plane_state *plane_state; > - struct drm_crtc_state *crtc_state; > - int i; > > drm_atomic_helper_commit_modeset_disables(dev, state); > > @@ -89,25 +63,9 @@ static void exynos_atomic_commit_complete(struct > exynos_atomic_commit *commit) >* have the relevant clocks enabled to perform the update. >*/ > > -
[PATCH 3/3] ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node
Add blue-and-red-wiring -property to lcdc node. The am335x-evmsk has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. After this patch am335x-evmsk supports BGR565, RGB888, and XRGB color formats. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen --- arch/arm/boot/dts/am335x-evmsk.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index 23b94e7..034e117 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x-evmsk.dts @@ -712,4 +712,6 @@ { status = "okay"; + + blue-and-red-wiring = "crossed"; }; -- 1.9.1
[PATCH 2/3] ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes
Whitespace cleanup of lcdc related nodes. Do all indentation and alignment with tabs instead of spaces. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen --- arch/arm/boot/dts/am335x-evmsk.dts | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts index 09308d6..23b94e7 100644 --- a/arch/arm/boot/dts/am335x-evmsk.dts +++ b/arch/arm/boot/dts/am335x-evmsk.dts @@ -170,29 +170,29 @@ pinctrl-1 = <_pins_sleep>; status = "okay"; panel-info { - ac-bias = <255>; - ac-bias-intrpt= <0>; - dma-burst-sz = <16>; - bpp = <32>; - fdd = <0x80>; - sync-edge = <0>; - sync-ctrl = <1>; - raster-order = <0>; - fifo-th = <0>; + ac-bias = <255>; + ac-bias-intrpt = <0>; + dma-burst-sz= <16>; + bpp = <32>; + fdd = <0x80>; + sync-edge = <0>; + sync-ctrl = <1>; + raster-order= <0>; + fifo-th = <0>; }; display-timings { 480x272 { - hactive = <480>; - vactive = <272>; - hback-porch = <43>; - hfront-porch= <8>; - hsync-len = <4>; - vback-porch = <12>; - vfront-porch= <4>; - vsync-len = <10>; + hactive = <480>; + vactive = <272>; + hback-porch = <43>; + hfront-porch= <8>; + hsync-len = <4>; + vback-porch = <12>; + vfront-porch= <4>; + vsync-len = <10>; clock-frequency = <900>; - hsync-active= <0>; - vsync-active= <0>; + hsync-active= <0>; + vsync-active= <0>; }; }; }; @@ -711,5 +711,5 @@ }; { - status = "okay"; + status = "okay"; }; -- 1.9.1
[PATCH 1/3] ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node
Add blue-and-red-wiring -property to lcdc node. The am335x-evm has blue and red wires crossed to get 24-bit RGB (and 16-bit BGR) support. After this patch am335x-evm supports BGR565, RGB888, and XRGB color formats. See details in Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen --- arch/arm/boot/dts/am335x-evm.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 5d28712..c3cbce0 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -497,6 +497,8 @@ { status = "okay"; + + blue-and-red-wiring = "crossed"; }; { -- 1.9.1
[PATCH 0/3] ARM: dts: am335x-* Add blue-and-red-wiring propery to lcdc nodes
These patches complete the am335x LCDC color errata fix[1]. The functional patches are now queued for v4.9. The patch for am335x-boneblack.dts is delayed until v4.10 or v4.9-rc phase to avoid conflickt with BBB HDMI audio DTS patch that slipped into tda998x pull request. [1] http://www.spinics.net/lists/devicetree/msg141246.html Jyri Sarha (3): ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node arch/arm/boot/dts/am335x-evm.dts | 2 ++ arch/arm/boot/dts/am335x-evmsk.dts | 42 -- 2 files changed, 24 insertions(+), 20 deletions(-) -- 1.9.1
[PATCH] drm/rockchip: Cleanup dangling devm pointers
Instead of assigning device managed resources to local variables, keep track of them in the vop struct. Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 131ae0f..bed782e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -142,6 +142,7 @@ struct vop { /* vop dclk reset */ struct reset_control *dclk_rst; + struct reset_control *ahb_rst; struct vop_win win[]; }; @@ -1333,7 +1334,6 @@ static int vop_initial(struct vop *vop) { const struct vop_data *vop_data = vop->data; const struct vop_reg_data *init_table = vop_data->init_table; - struct reset_control *ahb_rst; int i, ret; vop->hclk = devm_clk_get(vop->dev, "hclk_vop"); @@ -1374,15 +1374,15 @@ static int vop_initial(struct vop *vop) /* * do hclk_reset, reset all vop registers. */ - ahb_rst = devm_reset_control_get(vop->dev, "ahb"); - if (IS_ERR(ahb_rst)) { + vop->ahb_rst = devm_reset_control_get(vop->dev, "ahb"); + if (IS_ERR(vop->ahb_rst)) { dev_err(vop->dev, "failed to get ahb reset\n"); - ret = PTR_ERR(ahb_rst); + ret = PTR_ERR(vop->ahb_rst); goto err_disable_aclk; } - reset_control_assert(ahb_rst); + reset_control_assert(vop->ahb_rst); usleep_range(10, 20); - reset_control_deassert(ahb_rst); + reset_control_deassert(vop->ahb_rst); memcpy(vop->regsbak, vop->regs, vop->len); -- 2.8.0.rc3.226.g39d4020
[PATCH] drm/rockchip: Balance irq refcount on failure
If create_crtc fails in vop bind, ensure the irq refcount is zeroed back out before exiting. Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 57650c9..131ae0f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1551,11 +1551,15 @@ static int vop_bind(struct device *dev, struct device *master, void *data) ret = vop_create_crtc(vop); if (ret) - return ret; + goto err_enable_irq; pm_runtime_enable(>dev); return 0; + +err_enable_irq: + enable_irq(vop->irq); /* To balance out the disable_irq above */ + return ret; } static void vop_unbind(struct device *dev, struct device *master, void *data) -- 2.8.0.rc3.226.g39d4020
[PATCH] drm: Fix DisplayPort branch device ID
On Fri, 16 Sep 2016, Mika Kahola wrote: > Fix missing parameter description for DisplayPort branch device ID. > This fixes warning of "No description found for parameter 'id[6]'" when > creating documentation by 'make htmldocs'. > > Signed-off-by: Mika Kahola Pushed to drm-intel-next-queued, with some tags added: Reported-by: kbuild test robot References: https://lists.freedesktop.org/archives/intel-gfx/2016-September/106645.html Fixes: 266d783baaf5 ("drm: Read DP branch device id") BR, Jani. > --- > drivers/gpu/drm/drm_dp_helper.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > index a536514..0ad20f1 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -517,6 +517,7 @@ EXPORT_SYMBOL(drm_dp_downstream_max_bpc); > /** > * drm_dp_downstream_id() - identify branch device > * @aux: DisplayPort AUX channel > + * @id: DisplayPort branch device id > * > * Returns branch device id on success or NULL on failure > */ -- Jani Nikula, Intel Open Source Technology Center
[PATCH] drm: Fix DisplayPort branch device ID
Fix missing parameter description for DisplayPort branch device ID. This fixes warning of "No description found for parameter 'id[6]'" when creating documentation by 'make htmldocs'. Signed-off-by: Mika Kahola --- drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index a536514..0ad20f1 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -517,6 +517,7 @@ EXPORT_SYMBOL(drm_dp_downstream_max_bpc); /** * drm_dp_downstream_id() - identify branch device * @aux: DisplayPort AUX channel + * @id: DisplayPort branch device id * * Returns branch device id on success or NULL on failure */ -- 2.7.4
[PATCH] drm: fix implicit declaration build error on ia64
drivers/gpu/drm/drm_dp_helper.c: In function 'drm_dp_downstream_debug': >> drivers/gpu/drm/drm_dp_helper.c:551:2: error: implicit declaration of >> function 'seq_printf' [-Werror=implicit-function-declaration] seq_printf(m, "\tDP branch device present: %s\n", ^ >> drivers/gpu/drm/drm_dp_helper.c:559:3: error: implicit declaration of >> function 'seq_puts' [-Werror=implicit-function-declaration] seq_puts(m, "\t\tType: DisplayPort\n"); ^ Reported-by: kbuild test robot References: https://lists.freedesktop.org/archives/intel-gfx/2016-September/106638.html Fixes: 80209e5f2c42 ("drm: Add DP branch device info on debugfs") Cc: Mika Kahola Signed-off-by: Jani Nikula --- The commit being fixed is only in drm-intel tree. I failed at actually testing this, but I presume this is the fix... --- drivers/gpu/drm/drm_dp_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index a5365142cdba..894a6ac6f6e7 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include -- 2.1.4
[PATCH v4 01/14] drm: Centralize format information
Hi Tomi, On Friday 16 Sep 2016 12:44:31 Tomi Valkeinen wrote: > On 16/09/16 02:30, Laurent Pinchart wrote: > > I've checked the existing code that this patch series is replacing, and > > the [ARGB]{4} formats are currently reported as having a depth of 32. > > I'm not sure why that's the case, but I'd rather not touch it in this > > patch. If this is a bug we should fix it in a separate patch. > > I agree, I don't want this series to be held up. But this depth is > clearly broken, in some way or another. Even more reason to move it to > fb code =). And to then drop fbdev ;-) > >>> I'm not sure if it's worth the hassle, but if the depth is only for > >>> fbdev compat code, maybe a separate format->depth table in fbdev code > >>> (for the formats fbdev supports) would make this cleaner and avoid any > >>> future mistakes with new drm drivers. > >> > >> I agree actually, having it here will encourage anyone to use it. If you > >> don't want to split it out, at least add a comment along the lines of > >> your reply: > >> > This is used to implement the fbdev compatibility code, as fbdev > (unlike kms) makes use of that information. > > > > I've double-checked the existing usage of the depth value, and it turns > > out that quite a few drivers still use it for various purpose, through > > struct drm_framebuffer.depth. I thus wonder whether splitting the depth > > value from the format information table would really help, as drivers > > would have a way to access it anyway. > > Ok. > > Btw, are you sure alpha is not counted into depth? With a quick glance, > also drm_mode_legacy_fb_format() seems to expect depth to include alpha. > > I'm just thinking here that if "depth" is not clearly defined anywhere, > and the most common formats, 24bit RGB formats, are defined with depth > including alpha, well, maybe then that's how depth should be defined. > > Then again, I had a quick glance at the fbdev code, and > fb_get_color_depth() suggests that alpha is not counted in... I think depth is just ill-defined and shouldn't be used in drivers anymore, at least certainly not by new code. -- Regards, Laurent Pinchart
[PATCH 1/2 v3] drm/bridge: adv7511: Add Audio support.
On 09/07/2016 01:22 AM, John Stultz wrote: > This patch adds support to Audio for both adv7511 and adv7533 > bridge chips. > > This patch was originally from [1] by Lars-Peter Clausen > and was adapted by Archit Taneja and > Srinivas Kandagatla . > > Then I heavily reworked it to use the hdmi-codec driver. And also > folded in some audio packet initialization done by Andy Green > . So credit to them, but blame to me. > > [1] > https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/gpu/drm/i2c/adv7511_audio.c > > Cc: David Airlie > Cc: Archit Taneja > Cc: Laurent Pinchart > Cc: Wolfram Sang> Cc: Srinivas Kandagatla > Cc: "Ville Syrjälä" > Cc: Boris Brezillon > Cc: Andy Green > Cc: Dave Long > Cc: Guodong Xu > Cc: Zhangfei Gao > Cc: Mark Brown > Cc: Lars-Peter Clausen > Cc: Jose Abreu > Cc: dri-devel at lists.freedesktop.org > Signed-off-by: John Stultz I'm not to fond of the hdmi-codec stuff, but within its context this looks ok. Thanks for getting this upstream ready. Just one tiny bit regarding the Kconfig entry. If that is fixed feel free to add on the next revision: Acked-by: Lars-Peter Clausen > --- > v3: > * Allowed audio support to be configured in or out, as suggested by Laurent > * Minor cleanups suggested by Laurent > * Folded in Andy's audio packet initialization patch, as suggested by Archit > > drivers/gpu/drm/bridge/adv7511/Kconfig | 9 ++ > drivers/gpu/drm/bridge/adv7511/Makefile| 1 + > drivers/gpu/drm/bridge/adv7511/adv7511.h | 16 ++ > drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 213 > + > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 + > 5 files changed, 243 insertions(+) > create mode 100644 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c > > diff --git a/drivers/gpu/drm/bridge/adv7511/Kconfig > b/drivers/gpu/drm/bridge/adv7511/Kconfig > index d2b0499..b303ad1 100644 > --- a/drivers/gpu/drm/bridge/adv7511/Kconfig > +++ b/drivers/gpu/drm/bridge/adv7511/Kconfig > @@ -3,9 +3,18 @@ config DRM_I2C_ADV7511 > depends on OF > select DRM_KMS_HELPER > select REGMAP_I2C > + select SND_SOC_HDMI_CODEC if SND_SOC This seems to be redundant considering the select done by DRM_I2C_ADV7511_AUDIO. > help > Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders. > > +config DRM_I2C_ADV7511_AUDIO > + tristate "ADV7511 HDMI Audio driver" This should be bool. It either gets built into the ADV7511 driver (which itself could either be a module or built-in) or not. But setting this option itself to module wont work. > + depends on DRM_I2C_ADV7511 && SND_SOC > + select SND_SOC_HDMI_CODEC > + help > + Support the ADV7511 HDMI Audio interface. This is used in > + conjunction with the AV7511 HDMI driver. > + [...] > +static void audio_shutdown(struct device *dev, void *data) > +{ > +} Unrelated to this patch, but it looks like the shutdown callback should maybe be made optional. > +static const struct hdmi_codec_ops adv7511_codec_ops = { > + .hw_params = adv7511_hdmi_hw_params, > + .audio_shutdown = audio_shutdown, > + .audio_startup = audio_startup, > +};
[PATCH v4 01/14] drm: Centralize format information
On 16/09/16 02:30, Laurent Pinchart wrote: > I've checked the existing code that this patch series is replacing, and the > [ARGB]{4} formats are currently reported as having a depth of 32. I'm not > sure why that's the case, but I'd rather not touch it in this patch. If this > is a bug we should fix it in a separate patch. I agree, I don't want this series to be held up. But this depth is clearly broken, in some way or another. Even more reason to move it to fb code =). >>> I'm not sure if it's worth the hassle, but if the depth is only for >>> fbdev compat code, maybe a separate format->depth table in fbdev code >>> (for the formats fbdev supports) would make this cleaner and avoid any >>> future mistakes with new drm drivers. >> >> I agree actually, having it here will encourage anyone to use it. If you >> don't want to split it out, at least add a comment along the lines of >> your reply: >> >>>> This is used to implement the fbdev compatibility code, as fbdev (unlike >>>> kms) makes use of that information. > > I've double-checked the existing usage of the depth value, and it turns out > that quite a few drivers still use it for various purpose, through struct > drm_framebuffer.depth. I thus wonder whether splitting the depth value from > the format information table would really help, as drivers would have a way > to > access it anyway. Ok. Btw, are you sure alpha is not counted into depth? With a quick glance, also drm_mode_legacy_fb_format() seems to expect depth to include alpha. I'm just thinking here that if "depth" is not clearly defined anywhere, and the most common formats, 24bit RGB formats, are defined with depth including alpha, well, maybe then that's how depth should be defined. Then again, I had a quick glance at the fbdev code, and fb_get_color_depth() suggests that alpha is not counted in... Tomi -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/30b0cc4a/attachment.sig>
[drm-intel:for-linux-next 6/12] htmldocs: drivers/gpu/drm/drm_dp_helper.c:523: warning: No description found for parameter 'id[6]'
I'll fix this. Cheers, Mika On Fri, 2016-09-16 at 10:53 +0300, Jani Nikula wrote: > Mika, please send in the documentation fix. > > BR, > Jani. > > > On Fri, 16 Sep 2016, kbuild test robot > wrote: > > > > tree:   git://anongit.freedesktop.org/drm-intel for-linux-next > > head:   80209e5f2c42c491ec5f4a63705b4377b407587c > > commit: 266d783baaf5f34a5bea3b56489f091451a89767 [6/12] drm: Read > > DP branch device id > > reproduce: make htmldocs > > > > All warnings (new ones prefixed by >>): > > > >    drivers/gpu/drm/drm_modes.c:693: warning: No description found > > for parameter 'bus_flags' > > > > > > > > > > > drivers/gpu/drm/drm_dp_helper.c:523: warning: No description > > > > found for parameter 'id[6]' > >    drivers/gpu/drm/drm_dp_helper.c:524: warning: No description > > found for parameter 'id[6]' > >    drivers/gpu/drm/drm_plane_helper.c:248: warning: No description > > found for parameter 'dst' > >    drivers/gpu/drm/drm_plane_helper.c:248: warning: Excess function > > parameter 'dest' description in 'drm_plane_helper_check_update' > >    drivers/gpu/drm/drm_plane_helper.c:247: warning: No description > > found for parameter 'dst' > >    drivers/gpu/drm/drm_plane_helper.c:247: warning: Excess function > > parameter 'dest' description in 'drm_plane_helper_check_update' > >    drivers/gpu/drm/drm_crtc.c:1270: WARNING: Inline literal start- > > string without end-string. > >    drivers/gpu/drm/drm_crtc.c:1385: WARNING: Inline literal start- > > string without end-string. > >    include/drm/drm_crtc.h:1202: WARNING: Inline literal start- > > string without end-string. > >    include/drm/drm_crtc.h:1255: WARNING: Inline literal start- > > string without end-string. > >    include/drm/drm_crtc.h:1268: WARNING: Inline literal start- > > string without end-string. > >    include/drm/drm_crtc.h:1272: WARNING: Inline literal start- > > string without end-string. > >    drivers/gpu/drm/drm_irq.c:718: WARNING: Option list ends without > > a blank line; unexpected unindent. > >    drivers/gpu/drm/drm_fb_helper.c:2195: WARNING: Inline emphasis > > start-string without end-string. > >    drivers/gpu/drm/drm_simple_kms_helper.c:141: WARNING: Inline > > literal start-string without end-string. > >    include/drm/drm_gem.h:212: WARNING: Inline emphasis start-string > > without end-string. > >    drivers/gpu/drm/i915/i915_vgpu.c:176: WARNING: Literal block > > ends without a blank line; unexpected unindent. > >    drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis > > start-string without end-string. > >    drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis > > start-string without end-string. > >    drivers/gpu/drm/i915/intel_guc_fwif.h:159: WARNING: Block quote > > ends without a blank line; unexpected unindent. > >    drivers/gpu/drm/i915/intel_guc_fwif.h:178: WARNING: Enumerated > > list ends without a blank line; unexpected unindent. > >    Documentation/gpu/drm-kms.rst:13: WARNING: Could not lex > > literal_block as "C". Highlighting skipped. > >    Documentation/gpu/drm-kms-helpers.rst:16: WARNING: Could not lex > > literal_block as "C". Highlighting skipped. > >    Documentation/gpu/i915.rst:57: WARNING: Could not lex > > literal_block as "C". Highlighting skipped. > > > > vim +523 drivers/gpu/drm/drm_dp_helper.c > > > >    507 case DP_DS_16BPC: > >    508 return 16; > >    509 } > >    510 default: > >    511 return 0; > >    512 } > >    513 } > >    514 EXPORT_SYMBOL(drm_dp_downstream_max_bpc); > >    515 > >    516 /** > >    517  * drm_dp_downstream_id() - identify branch device > >    518  * @aux: DisplayPort AUX channel > >    519  * > >    520  * Returns branch device id on success or NULL on > > failure > >    521  */ > >    522 int drm_dp_downstream_id(struct drm_dp_aux *aux, char > > id[6]) > >  > 523 { > >    524 return drm_dp_dpcd_read(aux, DP_BRANCH_ID, > > id, 6); > >    525 } > >    526 EXPORT_SYMBOL(drm_dp_downstream_id); > >    527 > >    528 /* > >    529  * I2C-over-AUX implementation > >    530  */ > >    531 > > > > --- > > 0-DAY kernel test infrastructure                Open Source > > Technology Center > > https://lists.01.org/pipermail/kbuild-all                 > >   Intel > > Corporation
[PATCH] drm/ttm: remove cpu_address member from ttm_tt
Am 16.09.2016 um 11:32 schrieb Alexandre Courbot: > Patch 3d50d4dcb0 exposed the CPU address of DMA-allocated pages as > returned by dma_alloc_coherent because Nouveau on Tegra needed it. > > This is not required anymore - as there were no other users for it, > remove it and save some memory for everyone. > > Signed-off-by: Alexandre Courbot Reviewed-by: Christian König . > --- > drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 -- > drivers/gpu/drm/ttm/ttm_tt.c | 7 ++- > include/drm/ttm/ttm_bo_driver.h | 2 -- > 3 files changed, 2 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > index bef9f6feb635..cec4b4baa179 100644 > --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > @@ -858,7 +858,6 @@ static int ttm_dma_pool_get_pages(struct dma_pool *pool, > if (count) { > d_page = list_first_entry(>free_list, struct dma_page, > page_list); > ttm->pages[index] = d_page->p; > - ttm_dma->cpu_address[index] = d_page->vaddr; > ttm_dma->dma_address[index] = d_page->dma; > list_move_tail(_page->page_list, _dma->pages_list); > r = 0; > @@ -989,7 +988,6 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, > struct device *dev) > INIT_LIST_HEAD(_dma->pages_list); > for (i = 0; i < ttm->num_pages; i++) { > ttm->pages[i] = NULL; > - ttm_dma->cpu_address[i] = 0; > ttm_dma->dma_address[i] = 0; > } > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c > index bc5aa573f466..aee3c00f836e 100644 > --- a/drivers/gpu/drm/ttm/ttm_tt.c > +++ b/drivers/gpu/drm/ttm/ttm_tt.c > @@ -57,10 +57,8 @@ static void ttm_dma_tt_alloc_page_directory(struct > ttm_dma_tt *ttm) > { > ttm->ttm.pages = drm_calloc_large(ttm->ttm.num_pages, > sizeof(*ttm->ttm.pages) + > - sizeof(*ttm->dma_address) + > - sizeof(*ttm->cpu_address)); > - ttm->cpu_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); > - ttm->dma_address = (void *) (ttm->cpu_address + ttm->ttm.num_pages); > + sizeof(*ttm->dma_address)); > + ttm->dma_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages); > } > > #ifdef CONFIG_X86 > @@ -244,7 +242,6 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) > > drm_free_large(ttm->pages); > ttm->pages = NULL; > - ttm_dma->cpu_address = NULL; > ttm_dma->dma_address = NULL; > } > EXPORT_SYMBOL(ttm_dma_tt_fini); > diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h > index c986fa7effd2..4f0a92185995 100644 > --- a/include/drm/ttm/ttm_bo_driver.h > +++ b/include/drm/ttm/ttm_bo_driver.h > @@ -133,7 +133,6 @@ struct ttm_tt { >* struct ttm_dma_tt >* >* @ttm: Base ttm_tt struct. > - * @cpu_address: The CPU address of the pages >* @dma_address: The DMA (bus) addresses of the pages >* @pages_list: used by some page allocation backend >* > @@ -143,7 +142,6 @@ struct ttm_tt { >*/ > struct ttm_dma_tt { > struct ttm_tt ttm; > - void **cpu_address; > dma_addr_t *dma_address; > struct list_head pages_list; > };
[PATCH 2/2 v2][resend] drm: bridge: add DesignWare HDMI I2S audio support
On Fri, Sep 16, 2016 at 08:01:01AM +, Kuninori Morimoto wrote: > > Hi Mark > > Can I have feedback about this patch ? These are DRM patches, I'd expect them to go via the DRM subsystem. Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed. Sending content free pings adds to the mail volume (if they are seen at all) which is often the problem and since they can't be reviewed directly if something has gone wrong you'll have to resend the patches anyway, though there are some other maintainers who like them - if in doubt look at how patches for the subsystem are normally handled. -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/d555cb47/attachment.sig>
[PATCH] drm/sti: forbid plane on several mixer
On 09/15/2016 05:57 PM, Ville Syrjälä wrote: > On Thu, Sep 15, 2016 at 04:59:55PM +0200, Vincent ABRIOU wrote: >> >> >> On 09/15/2016 04:27 PM, Ville Syrjälä wrote: >>> On Wed, Sep 14, 2016 at 01:40:02PM +0200, Vincent Abriou wrote: When a plane is going to be enabled we re-evaluate the possible crtcs for the associated drm plane. Only the crtc on which the plane should be displayed is considered possible until the plane is disabled. Indeed STI hardware does not allow to dynamically change the plane's crtc/mixer assignment when the plane is in use (gdp is running). Signed-off-by: Vincent Abriou --- drivers/gpu/drm/sti/sti_gdp.c | 15 +++ drivers/gpu/drm/sti/sti_plane.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 3fc62c1..f7cd671 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -71,6 +71,9 @@ static struct gdp_format_to_str { #define GDP_NODE_NB_BANK2 #define GDP_NODE_PER_FIELD 2 +#define MAIN_CRTC_MASK BIT(0) +#define AUX_CRTC_MASK BIT(1) + struct sti_gdp_node { u32 gam_gdp_ctl; u32 gam_gdp_agc; @@ -690,6 +693,12 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane, } } + /* re-evaluate the possible crtcs */ + if (mixer->id == STI_MIXER_MAIN) + drm_plane->possible_crtcs = MAIN_CRTC_MASK; + else + drm_plane->possible_crtcs = AUX_CRTC_MASK; >>> >>> This stuff isn't meant to be changed dynamically. There's no event for >>> telling userspace to re-examine this sort of information. >> >> Yes sure. But by doing this, I let the userspace the ability to fix plan >> assignment by it self by re-evaluating the possible CRTC. Before new >> plane assignment. > > Only if it would re-fetch all planes/crtcs/etc. resources between every > operation. Doing that would suck big time. And with atomic that's not > even a theoretical option since everything would be configured with a > single ioctl. > I test with weston-1.11.0 and the behavior changed. It is now forbidden to set a plane on 2 differents CRTC. I will not going further on this patch. BR Vincent >> The kernel driver is then flexible enough to avoid Kernel crash. > > If the kernel crashes due to an an unsupported plane configuration, > then the kernel has to be fixed. > >> >> BR >> Vincent >> >>> + DRM_DEBUG_KMS("CRTC:%d (%s) drm plane:%d (%s)\n", crtc->base.id, sti_mixer_to_str(mixer), drm_plane->base.id, sti_plane_to_str(plane)); @@ -846,6 +855,9 @@ static void sti_gdp_atomic_disable(struct drm_plane *drm_plane, { struct sti_plane *plane = to_sti_plane(drm_plane); + /* restore possible crtcs value with the initial value */ + drm_plane->possible_crtcs = plane->init_possible_crtcs; + if (!drm_plane->crtc) { DRM_DEBUG_DRIVER("drm plane:%d not enabled\n", drm_plane->base.id); @@ -917,6 +929,9 @@ struct drm_plane *sti_gdp_create(struct drm_device *drm_dev, sti_gdp_init(gdp); + /* store the initial value of possible crtcs */ + gdp->plane.init_possible_crtcs = possible_crtcs; + res = drm_universal_plane_init(drm_dev, >plane.drm_plane, possible_crtcs, _gdp_plane_helpers_funcs, diff --git a/drivers/gpu/drm/sti/sti_plane.h b/drivers/gpu/drm/sti/sti_plane.h index ce3e8d6..70c5312 100644 --- a/drivers/gpu/drm/sti/sti_plane.h +++ b/drivers/gpu/drm/sti/sti_plane.h @@ -66,12 +66,14 @@ struct sti_fps_info { * @plane: drm plane it is bound to (if any) * @desc: plane type & id * @status: to know the status of the plane + * @init_possile_crtcs: store the initial possible crtc value * @fps_info: frame per second info */ struct sti_plane { struct drm_plane drm_plane; enum sti_plane_desc desc; enum sti_plane_status status; + u32 init_possible_crtcs; struct sti_fps_info fps_info; }; -- 1.9.1 ___ dri-devel mailing list dri-devel at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel >>> >
[PATCH] drm/panel: simple: Add Innolux G101ICE-L01 panel
Hi Thierry, could you please take a look at this? I think it's fine to go in. Thanks, Lucas Am Montag, den 15.08.2016, 14:32 +0200 schrieb Lucas Stach: > From: Michael Olbrich > > This patch adds support for Innolux Corporation 10.1" G101ICE-L01 WXGA > (1280x800) LVDS panel to the simple-panel driver. > > Signed-off-by: Michael Olbrich > Signed-off-by: Lucas Stach > --- > .../bindings/display/panel/innolux,g101ice-l01.txt | 7 + > drivers/gpu/drm/panel/panel-simple.c | 31 > ++ > 2 files changed, 38 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/display/panel/innolux,g101ice-l01.txt > > diff --git > a/Documentation/devicetree/bindings/display/panel/innolux,g101ice-l01.txt > b/Documentation/devicetree/bindings/display/panel/innolux,g101ice-l01.txt > new file mode 100644 > index ..9e7590465227 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/innolux,g101ice-l01.txt > @@ -0,0 +1,7 @@ > +Innolux Corporation 10.1" G101ICE-L01 WXGA (1280x800) LVDS panel > + > +Required properties: > +- compatible: should be "innolux,g101ice-l01" > + > +This binding is compatible with the simple-panel binding, which is specified > +in simple-panel.txt in this directory. > diff --git a/drivers/gpu/drm/panel/panel-simple.c > b/drivers/gpu/drm/panel/panel-simple.c > index 85143d1b9b31..fb52fee28f6c 100644 > --- a/drivers/gpu/drm/panel/panel-simple.c > +++ b/drivers/gpu/drm/panel/panel-simple.c > @@ -849,6 +849,34 @@ static const struct panel_desc innolux_at070tn92 = { > .bus_format = MEDIA_BUS_FMT_RGB888_1X24, > }; > > +static const struct display_timing innolux_g101ice_l01_timing = { > + .pixelclock = { 6040, 7110, 7470 }, > + .hactive = { 1280, 1280, 1280 }, > + .hfront_porch = { 41, 80, 100 }, > + .hback_porch = { 40, 79, 99 }, > + .hsync_len = { 1, 1, 1 }, > + .vactive = { 800, 800, 800 }, > + .vfront_porch = { 5, 11, 14 }, > + .vback_porch = { 4, 11, 14 }, > + .vsync_len = { 1, 1, 1 }, > + .flags = DISPLAY_FLAGS_DE_HIGH, > +}; > + > +static const struct panel_desc innolux_g101ice_l01 = { > + .timings = _g101ice_l01_timing, > + .num_timings = 1, > + .bpc = 8, > + .size = { > + .width = 217, > + .height = 135, > + }, > + .delay = { > + .enable = 200, > + .disable = 200, > + }, > + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, > +}; > + > static const struct drm_display_mode innolux_g121i1_l01_mode = { > .clock = 71000, > .hdisplay = 1280, > @@ -1575,6 +1603,9 @@ static const struct of_device_id platform_of_match[] = { > .compatible = "innolux,at070tn92", > .data = _at070tn92, > }, { > + .compatible ="innolux,g101ice-l01", > + .data = _g101ice_l01 > + }, { > .compatible ="innolux,g121i1-l01", > .data = _g121i1_l01 > }, {
[PATCH] drm/vc4: Enable limited range RGB output on HDMI with CEA modes.
Fixes broken grayscale ramps on many HDMI monitors, where large areas at the ends of the ramp would all appear as black or white. Signed-off-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_hdmi.c | 31 +-- drivers/gpu/drm/vc4/vc4_regs.h | 9 - 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9f85a579da74..1e61931846d3 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -301,6 +301,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *unadjusted_mode, struct drm_display_mode *mode) { + struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder); struct drm_device *dev = encoder->dev; struct vc4_dev *vc4 = to_vc4_dev(dev); bool debug_dump_regs = false; @@ -316,6 +317,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder, u32 vertb = (VC4_SET_FIELD(0, VC4_HDMI_VERTB_VSPO) | VC4_SET_FIELD(mode->vtotal - mode->vsync_end, VC4_HDMI_VERTB_VBP)); + u32 csc_ctl; if (debug_dump_regs) { DRM_INFO("HDMI regs before:\n"); @@ -354,9 +356,34 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder, (vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) | (hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW)); + csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR, + VC4_HD_CSC_CTL_ORDER); + + if (vc4_encoder->hdmi_monitor && drm_match_cea_mode(mode) > 1) { + /* CEA VICs other than #1 requre limited range RGB +* output. Apply a colorspace conversion to squash +* 0-255 down to 16-235. The matrix here is: +* +* [ 0 0 0.8594 16] +* [ 0 0.8594 0 16] +* [ 0.8594 0 0 16] +* [ 0 0 0 1] +*/ + csc_ctl |= VC4_HD_CSC_CTL_ENABLE; + csc_ctl |= VC4_HD_CSC_CTL_RGB2YCC; + csc_ctl |= VC4_SET_FIELD(VC4_HD_CSC_CTL_MODE_CUSTOM, +VC4_HD_CSC_CTL_MODE); + + HD_WRITE(VC4_HD_CSC_12_11, (0x000 << 16) | 0x000); + HD_WRITE(VC4_HD_CSC_14_13, (0x100 << 16) | 0x6e0); + HD_WRITE(VC4_HD_CSC_22_21, (0x6e0 << 16) | 0x000); + HD_WRITE(VC4_HD_CSC_24_23, (0x100 << 16) | 0x000); + HD_WRITE(VC4_HD_CSC_32_31, (0x000 << 16) | 0x6e0); + HD_WRITE(VC4_HD_CSC_34_33, (0x100 << 16) | 0x000); + } + /* The RGB order applies even when CSC is disabled. */ - HD_WRITE(VC4_HD_CSC_CTL, VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR, - VC4_HD_CSC_CTL_ORDER)); + HD_WRITE(VC4_HD_CSC_CTL, csc_ctl); HDMI_WRITE(VC4_HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N); diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h index 160942a9180e..9ecd6ff3d493 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++ b/drivers/gpu/drm/vc4/vc4_regs.h @@ -528,10 +528,17 @@ # define VC4_HD_CSC_CTL_MODE_SHIFT 2 # define VC4_HD_CSC_CTL_MODE_RGB_TO_SD_YPRPB 0 # define VC4_HD_CSC_CTL_MODE_RGB_TO_HD_YPRPB 1 -# define VC4_HD_CSC_CTL_MODE_CUSTOM2 +# define VC4_HD_CSC_CTL_MODE_CUSTOM3 # define VC4_HD_CSC_CTL_RGB2YCCBIT(1) # define VC4_HD_CSC_CTL_ENABLE BIT(0) +#define VC4_HD_CSC_12_11 0x044 +#define VC4_HD_CSC_14_13 0x048 +#define VC4_HD_CSC_22_21 0x04c +#define VC4_HD_CSC_24_23 0x050 +#define VC4_HD_CSC_32_31 0x054 +#define VC4_HD_CSC_34_33 0x058 + #define VC4_HD_FRAME_COUNT 0x068 /* HVS display list information. */ -- 2.9.3
[drm-intel:for-linux-next 6/12] htmldocs: drivers/gpu/drm/drm_dp_helper.c:523: warning: No description found for parameter 'id[6]'
Mika, please send in the documentation fix. BR, Jani. On Fri, 16 Sep 2016, kbuild test robot wrote: > tree: git://anongit.freedesktop.org/drm-intel for-linux-next > head: 80209e5f2c42c491ec5f4a63705b4377b407587c > commit: 266d783baaf5f34a5bea3b56489f091451a89767 [6/12] drm: Read DP branch > device id > reproduce: make htmldocs > > All warnings (new ones prefixed by >>): > >drivers/gpu/drm/drm_modes.c:693: warning: No description found for > parameter 'bus_flags' >>> drivers/gpu/drm/drm_dp_helper.c:523: warning: No description found for >>> parameter 'id[6]' >drivers/gpu/drm/drm_dp_helper.c:524: warning: No description found for > parameter 'id[6]' >drivers/gpu/drm/drm_plane_helper.c:248: warning: No description found for > parameter 'dst' >drivers/gpu/drm/drm_plane_helper.c:248: warning: Excess function parameter > 'dest' description in 'drm_plane_helper_check_update' >drivers/gpu/drm/drm_plane_helper.c:247: warning: No description found for > parameter 'dst' >drivers/gpu/drm/drm_plane_helper.c:247: warning: Excess function parameter > 'dest' description in 'drm_plane_helper_check_update' >drivers/gpu/drm/drm_crtc.c:1270: WARNING: Inline literal start-string > without end-string. >drivers/gpu/drm/drm_crtc.c:1385: WARNING: Inline literal start-string > without end-string. >include/drm/drm_crtc.h:1202: WARNING: Inline literal start-string without > end-string. >include/drm/drm_crtc.h:1255: WARNING: Inline literal start-string without > end-string. >include/drm/drm_crtc.h:1268: WARNING: Inline literal start-string without > end-string. >include/drm/drm_crtc.h:1272: WARNING: Inline literal start-string without > end-string. >drivers/gpu/drm/drm_irq.c:718: WARNING: Option list ends without a blank > line; unexpected unindent. >drivers/gpu/drm/drm_fb_helper.c:2195: WARNING: Inline emphasis > start-string without end-string. >drivers/gpu/drm/drm_simple_kms_helper.c:141: WARNING: Inline literal > start-string without end-string. >include/drm/drm_gem.h:212: WARNING: Inline emphasis start-string without > end-string. >drivers/gpu/drm/i915/i915_vgpu.c:176: WARNING: Literal block ends without > a blank line; unexpected unindent. >drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis > start-string without end-string. >drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis > start-string without end-string. >drivers/gpu/drm/i915/intel_guc_fwif.h:159: WARNING: Block quote ends > without a blank line; unexpected unindent. >drivers/gpu/drm/i915/intel_guc_fwif.h:178: WARNING: Enumerated list ends > without a blank line; unexpected unindent. >Documentation/gpu/drm-kms.rst:13: WARNING: Could not lex literal_block as > "C". Highlighting skipped. >Documentation/gpu/drm-kms-helpers.rst:16: WARNING: Could not lex > literal_block as "C". Highlighting skipped. >Documentation/gpu/i915.rst:57: WARNING: Could not lex literal_block as > "C". Highlighting skipped. > > vim +523 drivers/gpu/drm/drm_dp_helper.c > >507case DP_DS_16BPC: >508return 16; >509} >510default: >511return 0; >512} >513} >514EXPORT_SYMBOL(drm_dp_downstream_max_bpc); >515 >516/** >517 * drm_dp_downstream_id() - identify branch device >518 * @aux: DisplayPort AUX channel >519 * >520 * Returns branch device id on success or NULL on failure >521 */ >522int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]) > > 523{ >524return drm_dp_dpcd_read(aux, DP_BRANCH_ID, id, 6); >525} >526EXPORT_SYMBOL(drm_dp_downstream_id); >527 >528/* >529 * I2C-over-AUX implementation >530 */ >531 > > --- > 0-DAY kernel test infrastructureOpen Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation -- Jani Nikula, Intel Open Source Technology Center
[PATCH v2 3/5] drm/bridge: squash lines for simple wrapper functions
Hi Sean, 2016-09-15 23:46 GMT+09:00 Sean Paul : > On Thu, Sep 15, 2016 at 9:51 AM, Sean Paul wrote: >> On Wed, Sep 14, 2016 at 10:39 AM, Masahiro Yamada >> wrote: >>> Remove unneeded variables and assignments. >>> >>> Signed-off-by: Masahiro Yamada >> >> Reviewed-by: Sean Paul >> > > Decided to apply patches 1-4 to drm-misc > > Thanks, > > Sean Thanks. I've just updated [5/5 drm/i915] and posted v3. -- Best Regards Masahiro Yamada
[PATCH v3 5/5] drm/i915: squash lines for simple wrapper functions
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- Changes in v3: - Keep the wrapper function. Cleanup of variables and assignments only. - Fix intel_engine_init_common() as well. drivers/gpu/drm/i915/i915_drv.c| 8 +--- drivers/gpu/drm/i915/intel_engine_cs.c | 8 +--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 7f4e8ad..1503c88 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1324,13 +1324,7 @@ void i915_driver_unload(struct drm_device *dev) static int i915_driver_open(struct drm_device *dev, struct drm_file *file) { - int ret; - - ret = i915_gem_open(dev, file); - if (ret) - return ret; - - return 0; + return i915_gem_open(dev, file); } /** diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index e405f10..ebb4bf8 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -298,13 +298,7 @@ static void intel_engine_cleanup_scratch(struct intel_engine_cs *engine) */ int intel_engine_init_common(struct intel_engine_cs *engine) { - int ret; - - ret = intel_engine_init_breadcrumbs(engine); - if (ret) - return ret; - - return 0; + return intel_engine_init_breadcrumbs(engine); } void intel_engine_reset_irq(struct intel_engine_cs *engine) -- 1.9.1
linux-next: manual merge of the drm-intel tree with Linus' tree
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/intel_pm.c between commit: f403372658fc ("drm/i915/skl: Add support for the SAGV, fix underrun hangs") (which is also in the drm-intel tree) from Linus' tree and commit: 6f3fff602e81 ("drm/i915: Add ddb size field to device info structure") from the drm-intel tree. I fixed it up (I just used the drm-intel version) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell
[Bug 97605] AMDGPU Black Screen when Booting
https://bugs.freedesktop.org/show_bug.cgi?id=97605 --- Comment #5 from Timo Aaltonen --- a convenient way to try newer kernels on ubuntu is to wget the deb from http://kernel.ubuntu.com/~kernel-ppa/mainline/ in your case "generic" for amd64 amdgpu.ko on 16.04 is backported from 4.5, so try something newer -- 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/20160916/47bea7d6/attachment.html>
4.8-rc1: it is now common that machine needs re-run of xrandr after resume
On Thu, 15 Sep 2016, Martin Steigerwald wrote: > Am Mittwoch, 14. September 2016, 14:14:35 CEST schrieb Jani Nikula: >> On Wed, 14 Sep 2016, Jani Nikula wrote: >> > On Wed, 14 Sep 2016, Pavel Machek wrote: >> >> For the "sometimes need xrandr after resume": I don't think I can >> >> bisect that. It only happens sometimes :-(. But there's something >> >> helpful in the logs: >> >> >> >> [ 1856.218863] [drm:drm_edid_block_valid] *ERROR* EDID checksum is >> >> invalid, remainder is 130 >> >> [ 1856.218863] Raw EDID: >> >> [ 1856.218863] 00 ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] [drm:drm_edid_block_valid] *ERROR* EDID checksum is >> >> invalid, remainder is 130 >> >> [ 1856.218863] Raw EDID: >> >> [ 1856.218863] 00 ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] [drm:drm_edid_block_valid] *ERROR* EDID checksum is >> >> invalid, remainder is 130 >> >> [ 1856.218863] Raw EDID: >> >> [ 1856.218863] 00 ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] [drm:drm_edid_block_valid] *ERROR* EDID checksum is >> >> invalid, remainder is 130 >> >> [ 1856.218863] Raw EDID: >> >> [ 1856.218863] 00 ff ff ff ff ff ff 00 ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >> >> [ 1856.218863] i915 :00:02.0: HDMI-A-1: EDID block 0 invalid. >> > >> > Pavel, Martin, do you always see this when the display fails to resume? >> > Is it HDMI/DVI for both of you? >> >> Please try this patch, backported from our next. > > Was busy up to now, and weekend also quite full already. > > Thing is: I didn´t see this blank screen thing with 4.8-rc6 so far. And I > did > not have above EDID stuff in my log either. So I first wait whether I see > blank screen again and if so, then know that a test would make sense. Maybe I > see it before I complete a rc7 or rc8 (if there will be one), then I would > include the patch of course. N.b. it's entirely possible you and Pavel have different issues. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center
[drm-intel:for-linux-next 6/12] htmldocs: drivers/gpu/drm/drm_dp_helper.c:523: warning: No description found for parameter 'id[6]'
tree: git://anongit.freedesktop.org/drm-intel for-linux-next head: 80209e5f2c42c491ec5f4a63705b4377b407587c commit: 266d783baaf5f34a5bea3b56489f091451a89767 [6/12] drm: Read DP branch device id reproduce: make htmldocs All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_modes.c:693: warning: No description found for parameter 'bus_flags' >> drivers/gpu/drm/drm_dp_helper.c:523: warning: No description found for >> parameter 'id[6]' drivers/gpu/drm/drm_dp_helper.c:524: warning: No description found for parameter 'id[6]' drivers/gpu/drm/drm_plane_helper.c:248: warning: No description found for parameter 'dst' drivers/gpu/drm/drm_plane_helper.c:248: warning: Excess function parameter 'dest' description in 'drm_plane_helper_check_update' drivers/gpu/drm/drm_plane_helper.c:247: warning: No description found for parameter 'dst' drivers/gpu/drm/drm_plane_helper.c:247: warning: Excess function parameter 'dest' description in 'drm_plane_helper_check_update' drivers/gpu/drm/drm_crtc.c:1270: WARNING: Inline literal start-string without end-string. drivers/gpu/drm/drm_crtc.c:1385: WARNING: Inline literal start-string without end-string. include/drm/drm_crtc.h:1202: WARNING: Inline literal start-string without end-string. include/drm/drm_crtc.h:1255: WARNING: Inline literal start-string without end-string. include/drm/drm_crtc.h:1268: WARNING: Inline literal start-string without end-string. include/drm/drm_crtc.h:1272: WARNING: Inline literal start-string without end-string. drivers/gpu/drm/drm_irq.c:718: WARNING: Option list ends without a blank line; unexpected unindent. drivers/gpu/drm/drm_fb_helper.c:2195: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/drm_simple_kms_helper.c:141: WARNING: Inline literal start-string without end-string. include/drm/drm_gem.h:212: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/i915/i915_vgpu.c:176: WARNING: Literal block ends without a blank line; unexpected unindent. drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/i915/intel_audio.c:54: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/i915/intel_guc_fwif.h:159: WARNING: Block quote ends without a blank line; unexpected unindent. drivers/gpu/drm/i915/intel_guc_fwif.h:178: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/gpu/drm-kms.rst:13: WARNING: Could not lex literal_block as "C". Highlighting skipped. Documentation/gpu/drm-kms-helpers.rst:16: WARNING: Could not lex literal_block as "C". Highlighting skipped. Documentation/gpu/i915.rst:57: WARNING: Could not lex literal_block as "C". Highlighting skipped. vim +523 drivers/gpu/drm/drm_dp_helper.c 507 case DP_DS_16BPC: 508 return 16; 509 } 510 default: 511 return 0; 512 } 513 } 514 EXPORT_SYMBOL(drm_dp_downstream_max_bpc); 515 516 /** 517 * drm_dp_downstream_id() - identify branch device 518 * @aux: DisplayPort AUX channel 519 * 520 * Returns branch device id on success or NULL on failure 521 */ 522 int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]) > 523 { 524 return drm_dp_dpcd_read(aux, DP_BRANCH_ID, id, 6); 525 } 526 EXPORT_SYMBOL(drm_dp_downstream_id); 527 528 /* 529 * I2C-over-AUX implementation 530 */ 531 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- next part -- A non-text attachment was scrubbed... Name: .config.gz Type: application/octet-stream Size: 6422 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160916/17f80105/attachment-0001.obj>
[Bug 97605] AMDGPU Black Screen when Booting
https://bugs.freedesktop.org/show_bug.cgi?id=97605 --- Comment #4 from Michel Dänzer --- Any chance you can try a newer kernel? -- 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/20160916/3236533f/attachment.html>
[Bug 97605] AMDGPU Black Screen when Booting
https://bugs.freedesktop.org/show_bug.cgi?id=97605 Michel Dänzer changed: What|Removed |Added Attachment #126453|text/x-log |text/plain mime type|| -- 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/20160916/60ed/attachment.html>
[PATCH 0/3] ARM: dts: am335x-* Add blue-and-red-wiring propery to lcdc nodes
* Jyri Sarha [160916 04:50]: > These patches complete the am335x LCDC color errata fix[1]. The > functional patches are now queued for v4.9. > > The patch for am335x-boneblack.dts is delayed until v4.10 or v4.9-rc > phase to avoid conflickt with BBB HDMI audio DTS patch that slipped > into tda998x pull request. > > [1] http://www.spinics.net/lists/devicetree/msg141246.html OK. Are these safe to merge even if the dts changes get merged before the driver changes? Or does it break something if merged out of order? Regards, Tony > Jyri Sarha (3): > ARM: dts: am335x-evm: Add blue-and-red-wiring -property to lcdc node > ARM: dts: am335x-evmsk: Whitespace cleanup of lcdc related nodes > ARM: dts: am335x-evmsk: Add blue-and-red-wiring -property to lcdc node > > arch/arm/boot/dts/am335x-evm.dts | 2 ++ > arch/arm/boot/dts/am335x-evmsk.dts | 42 > -- > 2 files changed, 24 insertions(+), 20 deletions(-) > > -- > 1.9.1 >
[PATCH 2/2 v2][resend] drm: bridge: add DesignWare HDMI I2S audio support
Hi Mark Can I have feedback about this patch ? > From: Kuninori Morimoto > > Current dw-hdmi is supporting sound via AHB bus, but it has > I2S audio feature too. This patch adds I2S audio support to dw-hdmi. > This HDMI I2S is supported by using ALSA SoC common HDMI encoder > driver. > > Tested-by: Jose Abreu > Signed-off-by: Kuninori Morimoto > --- > v1 -> v2 > > - tidyup return value of snd_dw_hdmi_probe() > > drivers/gpu/drm/bridge/Kconfig | 8 ++ > drivers/gpu/drm/bridge/Makefile| 1 + > drivers/gpu/drm/bridge/dw-hdmi-audio.h | 7 ++ > drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c | 130 > + > drivers/gpu/drm/bridge/dw-hdmi.c | 22 - > drivers/gpu/drm/bridge/dw-hdmi.h | 21 + > 6 files changed, 187 insertions(+), 2 deletions(-) > create mode 100644 drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > index 8f7423f..8e2a22d 100644 > --- a/drivers/gpu/drm/bridge/Kconfig > +++ b/drivers/gpu/drm/bridge/Kconfig > @@ -32,6 +32,14 @@ config DRM_DW_HDMI_AHB_AUDIO > Designware HDMI block. This is used in conjunction with > the i.MX6 HDMI driver. > > +config DRM_DW_HDMI_I2S_AUDIO > + tristate "Synopsis Designware I2S Audio interface" > + depends on DRM_DW_HDMI > + select SND_SOC_HDMI_CODEC > + help > + Support the I2S Audio interface which is part of the Synopsis > + Designware HDMI block. > + > config DRM_NXP_PTN3460 > tristate "NXP PTN3460 DP/LVDS bridge" > depends on OF > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > index 96b13b3..1af92ad 100644 > --- a/drivers/gpu/drm/bridge/Makefile > +++ b/drivers/gpu/drm/bridge/Makefile > @@ -3,6 +3,7 @@ ccflags-y := -Iinclude/drm > obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o > obj-$(CONFIG_DRM_DW_HDMI) += dw-hdmi.o > obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw-hdmi-ahb-audio.o > +obj-$(CONFIG_DRM_DW_HDMI_I2S_AUDIO) += dw-hdmi-i2s-audio.o > obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o > obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o > obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ > diff --git a/drivers/gpu/drm/bridge/dw-hdmi-audio.h > b/drivers/gpu/drm/bridge/dw-hdmi-audio.h > index 91f631b..fd1f745 100644 > --- a/drivers/gpu/drm/bridge/dw-hdmi-audio.h > +++ b/drivers/gpu/drm/bridge/dw-hdmi-audio.h > @@ -11,4 +11,11 @@ struct dw_hdmi_audio_data { > u8 *eld; > }; > > +struct dw_hdmi_i2s_audio_data { > + struct dw_hdmi *hdmi; > + > + void (*write)(struct dw_hdmi *hdmi, u8 val, int offset); > + u8 (*read)(struct dw_hdmi *hdmi, int offset); > +}; > + > #endif > diff --git a/drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c > b/drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c > new file mode 100644 > index 000..7dd2091 > --- /dev/null > +++ b/drivers/gpu/drm/bridge/dw-hdmi-i2s-audio.c > @@ -0,0 +1,130 @@ > +/* > + * dw-hdmi-i2s-audio.c > + * > + * Copyright (c) 2016 Kuninori Morimoto > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > +#include > + > +#include > + > +#include "dw-hdmi.h" > +#include "dw-hdmi-audio.h" > + > +#define DRIVER_NAME "dw-hdmi-i2s-audio" > + > +static inline void hdmi_write(struct dw_hdmi_i2s_audio_data *audio, > + u8 val, int offset) > +{ > + struct dw_hdmi *hdmi = audio->hdmi; > + > + audio->write(hdmi, val, offset); > +} > + > +static inline u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset) > +{ > + struct dw_hdmi *hdmi = audio->hdmi; > + > + return audio->read(hdmi, offset); > +} > + > +static int dw_hdmi_i2s_hw_params(struct device *dev, void *data, > + struct hdmi_codec_daifmt *fmt, > + struct hdmi_codec_params *hparms) > +{ > + struct dw_hdmi_i2s_audio_data *audio = data; > + struct dw_hdmi *hdmi = audio->hdmi; > + u8 conf0 = 0; > + u8 conf1 = 0; > + u8 inputclkfs = 0; > + > + /* it cares I2S only */ > + if ((fmt->fmt != HDMI_I2S) || > + (fmt->bit_clk_master | fmt->frame_clk_master)) { > + dev_err(dev, "unsupported format/settings\n"); > + return -EINVAL; > + } > + > + inputclkfs = HDMI_AUD_INPUTCLKFS_64FS; > + conf0 = HDMI_AUD_CONF0_I2S_ALL_ENABLE; > + > + switch (hparms->sample_width) { > + case 16: > + conf1 = HDMI_AUD_CONF1_WIDTH_16; > + break; > + case 24: > + case 32: > + conf1 = HDMI_AUD_CONF1_WIDTH_24; > + break; > + } > + > + dw_hdmi_set_sample_rate(hdmi, hparms->sample_rate); > + > + hdmi_write(audio, inputclkfs, HDMI_AUD_INPUTCLKFS); > + hdmi_write(audio, conf0, HDMI_AUD_CONF0); > +
[Intel-gfx] [PATCH v3 5/5] drm/i915: squash lines for simple wrapper functions
On Fri, Sep 16, 2016 at 10:40:23AM +0900, Masahiro Yamada wrote: > Remove unneeded variables and assignments. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v3: > - Keep the wrapper function. > Cleanup of variables and assignments only. > - Fix intel_engine_init_common() as well. > > drivers/gpu/drm/i915/i915_drv.c| 8 +--- > drivers/gpu/drm/i915/intel_engine_cs.c | 8 +--- > 2 files changed, 2 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 7f4e8ad..1503c88 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -1324,13 +1324,7 @@ void i915_driver_unload(struct drm_device *dev) > > static int i915_driver_open(struct drm_device *dev, struct drm_file *file) > { > - int ret; > - > - ret = i915_gem_open(dev, file); > - if (ret) > - return ret; > - > - return 0; > + return i915_gem_open(dev, file); > } > > /** > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c > b/drivers/gpu/drm/i915/intel_engine_cs.c > index e405f10..ebb4bf8 100644 > --- a/drivers/gpu/drm/i915/intel_engine_cs.c > +++ b/drivers/gpu/drm/i915/intel_engine_cs.c > @@ -298,13 +298,7 @@ static void intel_engine_cleanup_scratch(struct > intel_engine_cs *engine) > */ > int intel_engine_init_common(struct intel_engine_cs *engine) > { > - int ret; > - > - ret = intel_engine_init_breadcrumbs(engine); > - if (ret) > - return ret; > - > - return 0; > + return intel_engine_init_breadcrumbs(engine); These are written like this for consistency and ease of change. -Chris -- Chris Wilson, Intel Open Source Technology Centre
[PATCH v4 01/14] drm: Centralize format information
Hello, On Thursday 15 Sep 2016 17:12:12 Eric Engestrom wrote: > On Thu, Sep 15, 2016 at 09:22:54AM +0300, Tomi Valkeinen wrote: > > On 15/09/16 01:22, Laurent Pinchart wrote: > >> No, the depth value is the number of colour bits, excluding the alpha > >> bits. This is used to implement the fbdev compatibility code, as fbdev > >> (unlike kms) makes use of that information. > >> > >> The total number of bits per pixel is not stored in the table as it can > >> be computed by cpp[0]*8 + (cpp[1]+cpp[2])*8/hsub/vsub. For RGB formats, > >> which are the only formats supported by the existing > >> drm_fb_get_bpp_depth() function, this simplifies to just cpp[0] * 8. > > > > Ok. Then the ARGB & co. formats have depth wrong. I presumed those > > were right as they're the "normal" ones =). > > Good catch, these should be 24 not 32. > I must admit I kinda skipped over that table the first time, and only > checked a few random values. > I just checked the whole table, and all the C and RGB formats are all > good (with the 4 /[ARGB]{4}/ formats set to .depth=24), and all the > YUV formats I know (~3/4) are good, but I don't know them all :) I've checked the existing code that this patch series is replacing, and the [ARGB]{4} formats are currently reported as having a depth of 32. I'm not sure why that's the case, but I'd rather not touch it in this patch. If this is a bug we should fix it in a separate patch. > > I'm not sure if it's worth the hassle, but if the depth is only for > > fbdev compat code, maybe a separate format->depth table in fbdev code > > (for the formats fbdev supports) would make this cleaner and avoid any > > future mistakes with new drm drivers. > > I agree actually, having it here will encourage anyone to use it. If you > don't want to split it out, at least add a comment along the lines of > your reply: > > >> This is used to implement the fbdev compatibility code, as fbdev (unlike > >> kms) makes use of that information. I've double-checked the existing usage of the depth value, and it turns out that quite a few drivers still use it for various purpose, through struct drm_framebuffer.depth. I thus wonder whether splitting the depth value from the format information table would really help, as drivers would have a way to access it anyway. -- Regards, Laurent Pinchart
[Bug 91278] Tonga GPU lock/reset fail with Unigine Valley
https://bugs.freedesktop.org/show_bug.cgi?id=91278 --- Comment #50 from Michel Dänzer --- (In reply to Andy Furniss from comment #49) > If it's still an issue for anyone you can reopen. This is your report, so anyone else please file their own instead. -- 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/20160916/6aa9636e/attachment.html>
[Bug 97796] Parts of screen do not update
https://bugs.freedesktop.org/show_bug.cgi?id=97796 Michel Dänzer changed: What|Removed |Added Product|DRI |xorg CC||ajax at nwnk.net Version|XOrg git|unspecified QA Contact||xorg-team at lists.x.org Component|DRM/other |Server/Ext/Composite Assignee|dri-devel at lists.freedesktop |xorg-team at lists.x.org |.org| --- Comment #8 from Michel Dänzer --- Sounds like an issue with the automatic redirection of depth 32 windows then. Adam, any ideas? -- 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/20160916/98111d64/attachment.html>
[PATCH v4.1 07/14] drm: tilcdc: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. In the tilcdc_crtc_mode_set() function compute the hardware register value directly from the pixel format instead of computing the number of bits per pixels first. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- Changes since v4: - Added support for DRM_FORMAT_BGR565, DRM_FORMAT_XBGR and DRM_FORMAT_BGR888 Changes since v3: - Removed DRM_FORMAT_ARGB support - Fixed coding style - Renamed min_pitch to pitch Cc: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 18 -- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 7 --- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 208768922030..0800545b5c5a 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -67,16 +67,14 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb) struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); struct drm_device *dev = crtc->dev; struct drm_gem_cma_object *gem; - unsigned int depth, bpp; dma_addr_t start, end; u64 dma_base_and_ceiling; - drm_fb_get_bpp_depth(fb->pixel_format, , ); gem = drm_fb_cma_get_gem_obj(fb, 0); start = gem->paddr + fb->offsets[0] + crtc->y * fb->pitches[0] + - crtc->x * bpp / 8; + crtc->x * drm_format_plane_cpp(fb->pixel_format, 0); end = start + (crtc->mode.vdisplay * fb->pitches[0]); @@ -412,16 +410,16 @@ static void tilcdc_crtc_mode_set_nofb(struct drm_crtc *crtc) if (info->tft_alt_mode) reg |= LCDC_TFT_ALT_ENABLE; if (priv->rev == 2) { - unsigned int depth, bpp; - - drm_fb_get_bpp_depth(fb->pixel_format, , ); - switch (bpp) { - case 16: + switch (fb->pixel_format) { + case DRM_FORMAT_BGR565: + case DRM_FORMAT_RGB565: break; - case 32: + case DRM_FORMAT_XBGR: + case DRM_FORMAT_XRGB: reg |= LCDC_V2_TFT_24BPP_UNPACK; /* fallthrough */ - case 24: + case DRM_FORMAT_BGR888: + case DRM_FORMAT_RGB888: reg |= LCDC_V2_TFT_24BPP_MODE; break; default: diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c index 74c65fa859b2..8a6a50d74aff 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c @@ -39,7 +39,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane, { struct drm_crtc_state *crtc_state; struct drm_plane_state *old_state = plane->state; - unsigned int depth, bpp; + unsigned int pitch; if (!state->crtc) return 0; @@ -68,8 +68,9 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane, return -EINVAL; } - drm_fb_get_bpp_depth(state->fb->pixel_format, , ); - if (state->fb->pitches[0] != crtc_state->mode.hdisplay * bpp / 8) { + pitch = crtc_state->mode.hdisplay * + drm_format_plane_cpp(state->fb->pixel_format, 0); + if (state->fb->pitches[0] != pitch) { dev_err(plane->dev->dev, "Invalid pitch: fb and crtc widths must be the same"); return -EINVAL; -- Regards, Laurent Pinchart
[PATCH 4/4] drm/sun4i: dotclock: Round to closest clock rate
With display pixel clocks we want to have the closest possible clock rate, to minimize timing and refresh rate skews. Whether the actual clock rate is higher or lower than the requested rate is less important. Also check candidates against the requested rate, rather than the ideal parent rate, the varying dividers also influence the difference between the requested rate and the rounded rate. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index 3eb99784f371..d401156490f3 100644 --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c @@ -90,7 +90,8 @@ static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate, goto out; } - if ((rounded < ideal) && (rounded > best_parent)) { + if (abs(rate - rounded / i) < + abs(rate - best_parent / best_div)) { best_parent = rounded; best_div = i; } -- 2.9.3
[PATCH 3/4] drm/sun4i: dotclock: Allow divider = 127
The dot clock divider is 7 bits wide, and the divider range is 1 ~ 127, or 6 ~ 127 if phase offsets are used. The 0 register value also represents a divider of 1 or bypass. Make the end condition of the for loop inclusive of 127 in the round_rate callback. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index 1b6c2253192e..3eb99784f371 100644 --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c @@ -77,7 +77,7 @@ static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate, u8 best_div = 1; int i; - for (i = 6; i < 127; i++) { + for (i = 6; i <= 127; i++) { unsigned long ideal = rate * i; unsigned long rounded; -- 2.9.3
[PATCH 2/4] drm/sun4i: dotclock: Fix clock rate read back calcation
When reading back the divider set in the register, we mask off the bits that aren't part of the divider. Unfortunately the mask used here was not converted from the field width. Fix this by converting the field width to a proper bit mask. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index 4332da48b1b3..1b6c2253192e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c @@ -62,7 +62,7 @@ static unsigned long sun4i_dclk_recalc_rate(struct clk_hw *hw, regmap_read(dclk->regmap, SUN4I_TCON0_DCLK_REG, ); val >>= SUN4I_TCON0_DCLK_DIV_SHIFT; - val &= SUN4I_TCON0_DCLK_DIV_WIDTH; + val &= (1 << SUN4I_TCON0_DCLK_DIV_WIDTH) - 1; if (!val) val = 1; -- 2.9.3
[PATCH 1/4] drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI
The 18 or 24 bit parallel RGB LCD panel interface found on Allwinner SoCs matches the description of MIPI DPI. Declare the RGB encoder and connector as MIPI DPI. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_rgb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c index c3ff10f559cc..8b520d9f5bd9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_rgb.c +++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c @@ -240,7 +240,7 @@ int sun4i_rgb_init(struct drm_device *drm) ret = drm_encoder_init(drm, >encoder, _rgb_enc_funcs, - DRM_MODE_ENCODER_NONE, + DRM_MODE_ENCODER_DPI, NULL); if (ret) { dev_err(drm->dev, "Couldn't initialise the rgb encoder\n"); @@ -255,7 +255,7 @@ int sun4i_rgb_init(struct drm_device *drm) _rgb_con_helper_funcs); ret = drm_connector_init(drm, >connector, _rgb_con_funcs, -DRM_MODE_CONNECTOR_Unknown); +DRM_MODE_CONNECTOR_DPI); if (ret) { dev_err(drm->dev, "Couldn't initialise the rgb connector\n"); goto err_cleanup_connector; -- 2.9.3
[PATCH 0/4] drm/sun4i: rgb and dotclock misc fixes and improvements
Hi Maxime, Here are a few small fixes and improvements to the sun4i drm driver. Patch 1 declares the LCD panel RGB interface encoder and connector types as MIPI DPI. AFAIK DPI is the parallel RGB variant. Patch 2 fixes the weird clock rates I was getting on the dot clock when testing the RGB-to-VGA bridge patches. You may want to queue this as a fix for 4.8. Patch 3 increases the dot clock divider upper bound by 1 to 127. AFAIK 127 is a valid divider. I doubt we will ever use it, since the parents will go way higher than they are supposed to, but getting it right is nicer. Patch 4 changes the dot clock's behavior to make it round to the closest clock rate. I think this would make it easier to match the LCD panel's timings. More on the LCD timings in a later patch set. Regards ChenYu Chen-Yu Tsai (4): drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI drm/sun4i: dotclock: Fix clock rate read back calcation drm/sun4i: dotclock: Allow divider = 127 drm/sun4i: dotclock: Round to closest clock rate drivers/gpu/drm/sun4i/sun4i_dotclock.c | 7 --- drivers/gpu/drm/sun4i/sun4i_rgb.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) -- 2.9.3