Re: [Freedreno] [PATCH 10/20] drm: rockchip: Rely on the default ->best_encoder() behavior

2016-06-06 Thread Mark yao

On 2016年06月02日 22:31, Boris Brezillon wrote:

All outputss have a 1:1 relationship between connectors and encoders
and the driver is relying on the atomic helpers: we can drop the custom
->best_encoder() implementations  and let the core call
drm_atomic_helper_best_encoder() for us.


Good, All connectors and encoders is 1:1 relationship on rockchip 
outputs, so


Acked-by: Mark Yao 



Signed-off-by: Boris Brezillon 
---
  drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 9 -
  drivers/gpu/drm/rockchip/inno_hdmi.c   | 9 -
  2 files changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c 
b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
index dedc65b..ca22e5e 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
@@ -964,18 +964,9 @@ static enum drm_mode_status dw_mipi_dsi_mode_valid(
return mode_status;
  }
  
-static struct drm_encoder *dw_mipi_dsi_connector_best_encoder(

-   struct drm_connector *connector)
-{
-   struct dw_mipi_dsi *dsi = con_to_dsi(connector);
-
-   return >encoder;
-}
-
  static struct drm_connector_helper_funcs dw_mipi_dsi_connector_helper_funcs = 
{
.get_modes = dw_mipi_dsi_connector_get_modes,
.mode_valid = dw_mipi_dsi_mode_valid,
-   .best_encoder = dw_mipi_dsi_connector_best_encoder,
  };
  
  static enum drm_connector_status

diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c 
b/drivers/gpu/drm/rockchip/inno_hdmi.c
index f8b4feb..006260d 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -579,14 +579,6 @@ inno_hdmi_connector_mode_valid(struct drm_connector 
*connector,
return MODE_OK;
  }
  
-static struct drm_encoder *

-inno_hdmi_connector_best_encoder(struct drm_connector *connector)
-{
-   struct inno_hdmi *hdmi = to_inno_hdmi(connector);
-
-   return >encoder;
-}
-
  static int
  inno_hdmi_probe_single_connector_modes(struct drm_connector *connector,
   uint32_t maxX, uint32_t maxY)
@@ -613,7 +605,6 @@ static struct drm_connector_funcs inno_hdmi_connector_funcs 
= {
  static struct drm_connector_helper_funcs inno_hdmi_connector_helper_funcs = {
.get_modes = inno_hdmi_connector_get_modes,
.mode_valid = inno_hdmi_connector_mode_valid,
-   .best_encoder = inno_hdmi_connector_best_encoder,
  };
  
  static int inno_hdmi_register(struct drm_device *drm, struct inno_hdmi *hdmi)



--
Mark Yao


___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [RFC v3 44/45] dma-mapping: Remove dma_get_attr

2016-06-06 Thread Hans-Christian Noren Egtvedt
Around Thu 02 Jun 2016 17:39:46 +0200 or thereabout, Krzysztof Kozlowski wrote:
> After switching DMA attributes to unsigned long it is easier to just
> compare the bits.
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  Documentation/DMA-API.txt  |  4 +--
>  arch/arc/mm/dma.c  |  4 +--
>  arch/arm/mm/dma-mapping.c  | 36 
> --
>  arch/arm/xen/mm.c  |  4 +--
>  arch/arm64/mm/dma-mapping.c| 10 +++
>  arch/avr32/mm/dma-coherent.c   |  4 +--

For the AVR32 related change

Acked-by: Hans-Christian Noren Egtvedt 

>  arch/ia64/sn/pci/pci_dma.c | 10 ++-
>  arch/metag/kernel/dma.c|  2 +-
>  arch/mips/mm/dma-default.c |  6 ++---
>  arch/openrisc/kernel/dma.c |  4 +--
>  arch/parisc/kernel/pci-dma.c   |  2 +-
>  arch/powerpc/platforms/cell/iommu.c| 10 +++
>  drivers/gpu/drm/rockchip/rockchip_drm_gem.c|  2 +-
>  drivers/iommu/dma-iommu.c  |  2 +-
>  drivers/media/v4l2-core/videobuf2-dma-contig.c |  2 +-
>  include/linux/dma-mapping.h| 13 --
>  16 files changed, 46 insertions(+), 69 deletions(-)



> diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c
> index fc51f4421933..58610d0df7ed 100644
> --- a/arch/avr32/mm/dma-coherent.c
> +++ b/arch/avr32/mm/dma-coherent.c
> @@ -109,7 +109,7 @@ static void *avr32_dma_alloc(struct device *dev, size_t 
> size,
>   return NULL;
>   phys = page_to_phys(page);
>  
> - if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) {
> + if (attrs & DMA_ATTR_WRITE_COMBINE) {
>   /* Now, map the page into P3 with write-combining turned on */
>   *handle = phys;
>   return __ioremap(phys, size, _PAGE_BUFFER);
> @@ -123,7 +123,7 @@ static void avr32_dma_free(struct device *dev, size_t 
> size,
>  {
>   struct page *page;
>  
> - if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) {
> + if (attrs & DMA_ATTR_WRITE_COMBINE) {
>   iounmap(cpu_addr);
>  
>   page = phys_to_page(handle);



-- 
mvh
Hans-Christian Noren Egtvedt
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno