Do some refactoring of the code, #1 is clean up, #2 is for
code refactoring.
Tian Tao (2):
drm/hisilicon: Remove the unnecessary header files
drm/hisilicon: Code refactoring for hibmc_drv_de
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 58 ++--
drivers/gpu/drm
t's no need to
set dev->pdev->msi_enabled again.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm
fixed the following warning:
hibmc_drm_drv.c:296:1-18:WARNING: Assignment of 0/1 to bool variable.
hibmc_drm_drv.c:301:2-19: WARNING: Assignment of 0/1 to bool variable.
v2:
using the pci_dev.msi_enabled instead of priv->msi_enabled.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hi
code refactoring for hibmc_drv_vdac.c, no actual function changes.
v2:
remove the debug message.
v3:
embedding connector and encoder in struct hibmc_drm_private.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 +
drivers/gpu/drm/hisilicon/hibmc
using the new API drmm_kzalloc() instead of devm_kzalloc()
v3:
still fixed include statements sorted alphabetically.
v2:
keep the DRM include statements sorted alphabetically.
Signed-off-by: Tian Tao
Reviewed-by: Thomas Zimmermann
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3
fixed the following warning:
hibmc_drm_drv.c:296:1-18:WARNING: Assignment of 0/1 to bool variable.
hibmc_drm_drv.c:301:2-19: WARNING: Assignment of 0/1 to bool variable.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2
using the new API drmm_kzalloc() instead of devm_kzalloc()
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
b/drivers/gpu/drm/hisilicon/hibmc
using the new API drmm_kzalloc() instead of devm_kzalloc()
v2:
keep the DRM include statements sorted alphabetically.
Signed-off-by: Tian Tao
Reviewed-by: Thomas Zimmermann
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 18 +-
1 file changed, 9 insertions(+), 9
add the shutdown function to release the resource.
v2:
Remove the unnecessary unmap function.
Signed-off-by: Tian Tao
Reviewed-by: Sam Ravnborg
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
add the shutdown function to release the resource.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
b/drivers/gpu/drm/hisilicon/hibmc
code refactoring for hibmc_drv_vdac.c, no actual function changes.
v2:
remove the debug message.
Signed-off-by: Tian Tao
Reviewed-by: Joe Perches
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 50 +++-
1 file changed, 14 insertions(+), 36 deletions(-)
diff --git
code refactoring for hibmc_drv_vdac.c, no actual function changes.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 48
1 file changed, 15 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
b
code cleanup for hibmc_drv_vdac.c, no actual function changes.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 49
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc
add the shutdown function to release the resource.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
b/drivers/gpu/drm/hisilicon/hibmc
code cleanup for hibmc_drv_vdac.c, no actual function changes.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 49
1 file changed, 16 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc
add the shutdown function to release the resource.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
b/drivers/gpu/drm/hisilicon/hibmc
using the load and unload function provided by drm framework instead of
doing the same work in the hibmc_pci_probe and do some code cleanup.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 62 +
drivers/gpu/drm
using the load and unload function provided by drm framework instead of
doing the same work in the hibmc_pci_probe and do some code cleanup.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 62 +
drivers/gpu/drm
because the hardware limitation,The initial color depth must set to 32bpp
and must set the FB Offset of the display hardware to 128Byte alignment,
which is used to solve the display problem at 800x600 and 1440x900
resolution under 16bpp.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
use the drm_fb_helper_remove_conflicting_pci_framebuffer to remove
the framebuffer initialized by fireware/bootloader to avoid resource
conflict.
Signed-off-by: Tian Tao
---
v2: use the general API to remove the conflict resource instead of rolling
our own.
---
---
drivers/gpu/drm
the kernel provide the drm_fb_helper_remove_conflicting_pci_framebuffer
to remvoe the pcie resource conflict,there is no need to driver it again.
Signed-off-by: Tian Tao
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 22 +-
1 file changed, 5 insertions(+), 17
set the preferred mode resolution to 1024 * 768 and maximum
resolution to 1920 * 1200.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon
remove the framebuffer initialized by fireware/bootloader,which will use
hibmc's pcie resource, and may cause conflict.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 18 ++
1 file changed, 18 insertions(+)
diff --git
set the prefer_shadow as 1,so we use the shadowfb to acceleration.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
b
add mode_valid function, we can make sure the resolution is valid.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
Reviewed-by: Thomas Zimmermann
---
v2: declare hibmc_crtc_mode_valid as static.
Modify the return value of hibmc_crtc_mode_valid .
---
drivers/gpu/drm/hisilicon
add mode_valid function, and we can also use it to make suse the resolution
is valid.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 20
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/hisilicon/hibmc
because the hardware limitation,The initial color depth must set to 32bpp
and must set the FB Offset of the display hardware to 128Byte alignment,
which is used to solve the display problem at 800x600 and 1440x900
resolution under 16bpp.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
The maximum resolution supported by hibmc is 1920 * 1200 instead of
1920 * 1440, this patch fixed this problem
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu
since we can get the BO from drm_fb rather than hibmc_fb,do not need
the hibmc_fb.so we delete the local variable hibmc_fb.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
Add the three new pll config for corresponding resolution 1440x900 and
1600x900, 640x480 for hibmc
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 +++
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_regs.h | 2 ++
2 files changed, 5
In the previous version, the callback function mode_valid of
drm_connector_helper_funcs directly returned MODE_OK. Now we will
ensure that the resolution is correct and return MODE_OK, otherwise
return MODE_NOMODE.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm
In the previous version, the callback function mode_valid of
drm_connector_helper_funcs directly returned MODE_OK. Now we will
ensure that the resolution is correct and return MODE_OK, otherwise
return MODE_NOMODE.
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm
Add the three new resolution 1440x900 and 1600x900, 640x480 for hibmc
and Set the FB Offset of the display hardware to 128 Byte alignment
Signed-off-by: Tian Tao
Signed-off-by: Gong junjie
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 11 +--
drivers/gpu/drm/hisilicon/hibmc
201 - 233 of 233 matches
Mail list logo