drm/gma500/cdv: Remove unused code for crt init
Subsystems (3)
Patrik Jakobsson
maintainerPATCH 1/6 drm/gma500/cdv: Remove unused code for crt init
Clearly never been used so just remove it.
--- drivers/gpu/drm/gma500/cdv_intel_crt.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/gpu/drm/gma500/cdv_intel_crt.c +1 -14
@@ -248,8 +248,6 @@ void cdv_intel_crt_init(struct drm_device *dev,struct drm_connector *connector;struct drm_encoder *encoder; -u32 i2c_reg; - gma_encoder =kzalloc (sizeof (struct gma_encoder ),GFP_KERNEL );if (!gma_encoder)return ;
@@ -269,24 +267,13 @@ void cdv_intel_crt_init(struct drm_device *dev,gma_connector_attach_encoder (gma_connector, gma_encoder);/* Set up the DDC bus. */ - i2c_reg =GPIOA ; -/* Remove the following code for CDV */ -/* -if (dev_priv->crt_ddc_bus != 0) -i2c_reg = dev_priv->crt_ddc_bus; -}*/ - gma_encoder->ddc_bus =psb_intel_i2c_create (dev, - i2c_reg,"CRTDDC_A" ); + gma_encoder->ddc_bus =psb_intel_i2c_create (dev,GPIOA ,"CRTDDC_A" );if (!gma_encoder->ddc_bus) {dev_printk (KERN_ERR , dev->dev,"DDC bus registration failed.\n" ); goto failed_ddc; } gma_encoder->type =INTEL_OUTPUT_ANALOG ; -/* -psb_intel_output->clone_mask = (1 << INTEL_ANALOG_CLONE_BIT); -psb_intel_output->crtc_mask = (1 << 0) | (1 << 1); -*/ connector->interlace_allowed =0 ; connector->doublescan_allowed =0 ;
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerPATCH 2/6 drm/gma500: Remove unused DPST support
DPST never got enabled so remove it. We keep the reg save/restore code just for safety.
--- drivers/gpu/drm/gma500/psb_drv.h | 4 - drivers/gpu/drm/gma500/psb_intel_reg.h | 32 ------- drivers/gpu/drm/gma500/psb_irq.c | 110 ------------------------- drivers/gpu/drm/gma500/psb_irq.h | 4 - 4 files changed, 150 deletions(-)
drivers/gpu/drm/gma500/psb_drv.h +0 -4
@@ -622,13 +622,9 @@ static inline struct drm_psb_private *psb_priv(struct drm_device *dev)/* psb_irq.c */ extern irqreturn_t psb_irq_handler (int irq,void *arg); -extern int psb_irq_enable_dpst (struct drm_device *dev); -extern int psb_irq_disable_dpst (struct drm_device *dev);extern void psb_irq_preinstall (struct drm_device *dev);extern int psb_irq_postinstall (struct drm_device *dev);extern void psb_irq_uninstall (struct drm_device *dev); -extern void psb_irq_turn_on_dpst (struct drm_device *dev); -extern void psb_irq_turn_off_dpst (struct drm_device *dev);extern void psb_irq_uninstall_islands (struct drm_device *dev,int hw_islands);extern int psb_vblank_wait2 (struct drm_device *dev,unsigned int *sequence);
drivers/gpu/drm/gma500/psb_intel_reg.h +0 -32
@@ -550,38 +550,6 @@#define HISTOGRAM_INT_CTRL_CLEAR (1UL << 30)#define DPST_YUV_LUMA_MODE 0 -struct dpst_ie_histogram_control { -union { -uint32_t data; -struct { -uint32_t bin_reg_index:7 ; -uint32_t reserved:4 ; -uint32_t bin_reg_func_select:1 ; -uint32_t sync_to_phase_in:1 ; -uint32_t alt_enhancement_mode:2 ; -uint32_t reserved1:1 ; -uint32_t sync_to_phase_in_count:8 ; -uint32_t histogram_mode_select:1 ; -uint32_t reserved2:4 ; -uint32_t ie_pipe_assignment:1 ; -uint32_t ie_mode_table_enabled:1 ; -uint32_t ie_histogram_enable:1 ; - }; - }; -}; - -struct dpst_guardband { -union { -uint32_t data; -struct { -uint32_t guardband:22 ; -uint32_t guardband_interrupt_delay:8 ; -uint32_t interrupt_status:1 ; -uint32_t interrupt_enable:1 ; - }; - }; -}; -#define PIPEAFRAMEHIGH 0x70040#define PIPEAFRAMEPIXEL 0x70044#define PIPEBFRAMEHIGH 0x71040
drivers/gpu/drm/gma500/psb_irq.c +0 -110
122 lines not on this page · raw message
drivers/gpu/drm/gma500/psb_irq.h +0 -4
@@ -23,10 +23,6 @@ int psb_irq_postinstall(struct drm_device *dev);void psb_irq_uninstall (struct drm_device *dev);irqreturn_t psb_irq_handler (int irq,void *arg); -int psb_irq_enable_dpst (struct drm_device *dev); -int psb_irq_disable_dpst (struct drm_device *dev); -void psb_irq_turn_on_dpst (struct drm_device *dev); -void psb_irq_turn_off_dpst (struct drm_device *dev);int psb_enable_vblank (struct drm_crtc *crtc);void psb_disable_vblank (struct drm_crtc *crtc);u32 psb_get_vblank_counter (struct drm_crtc *crtc);
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/6] drm/gma500: Remove unused DPST support
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 4 lines
DPST never got enabled so remove it. We keep the reg save/restore code just for safety.
Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 212 lines
--- drivers/gpu/drm/gma500/psb_drv.h | 4 - drivers/gpu/drm/gma500/psb_intel_reg.h | 32 ------- drivers/gpu/drm/gma500/psb_irq.c | 110 ------------------------- drivers/gpu/drm/gma500/psb_irq.h | 4 - 4 files changed, 150 deletions(-)drivers/gpu/drm/gma500/psb_drv.h +0
-4@@ -622,13 +622,9 @@ static inline struct drm_psb_private *psb_priv(struct drm_device *dev)/* psb_irq.c */ extern irqreturn_t psb_irq_handler (int irq,void *arg); -extern int psb_irq_enable_dpst (struct drm_device *dev); -extern int psb_irq_disable_dpst (struct drm_device *dev);extern void psb_irq_preinstall (struct drm_device *dev);extern int psb_irq_postinstall (struct drm_device *dev);extern void psb_irq_uninstall (struct drm_device *dev); -extern void psb_irq_turn_on_dpst (struct drm_device *dev); -extern void psb_irq_turn_off_dpst (struct drm_device *dev);extern void psb_irq_uninstall_islands (struct drm_device *dev,int hw_islands);extern int psb_vblank_wait2 (struct drm_device *dev,unsigned int *sequence);drivers/gpu/drm/gma500/psb_intel_reg.h +0
-32@@ -550,38 +550,6 @@#define HISTOGRAM_INT_CTRL_CLEAR (1UL << 30)#define DPST_YUV_LUMA_MODE 0 -struct dpst_ie_histogram_control { -union { -uint32_t data; -struct { -uint32_t bin_reg_index:7 ; -uint32_t reserved:4 ; -uint32_t bin_reg_func_select:1 ; -uint32_t sync_to_phase_in:1 ; -uint32_t alt_enhancement_mode:2 ; -uint32_t reserved1:1 ; -uint32_t sync_to_phase_in_count:8 ; -uint32_t histogram_mode_select:1 ; -uint32_t reserved2:4 ; -uint32_t ie_pipe_assignment:1 ; -uint32_t ie_mode_table_enabled:1 ; -uint32_t ie_histogram_enable:1 ; - }; - }; -}; - -struct dpst_guardband { -union { -uint32_t data; -struct { -uint32_t guardband:22 ; -uint32_t guardband_interrupt_delay:8 ; -uint32_t interrupt_status:1 ; -uint32_t interrupt_enable:1 ; - }; - }; -}; -#define PIPEAFRAMEHIGH 0x70040#define PIPEAFRAMEPIXEL 0x70044#define PIPEBFRAMEHIGH 0x71040drivers/gpu/drm/gma500/psb_irq.c +0
-110@@ -101,30 +101,6 @@ psb_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask) } } -static void mid_enable_pipe_event (struct drm_psb_private *dev_priv,int pipe) -{ -if (gma_power_begin (dev_priv->dev, false)) { -u32 pipe_event =mid_pipe_event (pipe); - dev_priv->vdc_irq_mask |= pipe_event; -PSB_WVDC32 (~dev_priv->vdc_irq_mask,PSB_INT_MASK_R ); -PSB_WVDC32 (dev_priv->vdc_irq_mask,PSB_INT_ENABLE_R ); -gma_power_end (dev_priv->dev); - } -} - -static void mid_disable_pipe_event (struct drm_psb_private *dev_priv,int pipe) -{ -if (dev_priv->pipestat[pipe] ==0 ) { -if (gma_power_begin (dev_priv->dev, false)) { -u32 pipe_event =mid_pipe_event (pipe); - dev_priv->vdc_irq_mask &= ~pipe_event; -PSB_WVDC32 (~dev_priv->vdc_irq_mask,PSB_INT_MASK_R ); -PSB_WVDC32 (dev_priv->vdc_irq_mask,PSB_INT_ENABLE_R ); -gma_power_end (dev_priv->dev); - } - } -} -/* * Display controller interrupt handler for pipe event. */ @@ -392,92 +368,6 @@ void psb_irq_uninstall(struct drm_device *dev)spin_unlock_irqrestore (&dev_priv->irqmask_lock, irqflags); } -void psb_irq_turn_on_dpst (struct drm_device *dev) -{ -struct drm_psb_private *dev_priv = - (struct drm_psb_private *) dev->dev_private; -u32 hist_reg; -u32 pwm_reg; - -if (gma_power_begin (dev, false)) { -PSB_WVDC32 (1 <<31 ,HISTOGRAM_LOGIC_CONTROL ); - hist_reg =PSB_RVDC32 (HISTOGRAM_LOGIC_CONTROL ); -PSB_WVDC32 (1 <<31 ,HISTOGRAM_INT_CONTROL ); - hist_reg =PSB_RVDC32 (HISTOGRAM_INT_CONTROL ); - -PSB_WVDC32 (0x80010100 ,PWM_CONTROL_LOGIC ); - pwm_reg =PSB_RVDC32 (PWM_CONTROL_LOGIC ); -PSB_WVDC32 (pwm_reg |PWM_PHASEIN_ENABLE - |PWM_PHASEIN_INT_ENABLE , -PWM_CONTROL_LOGIC ); - pwm_reg =PSB_RVDC32 (PWM_CONTROL_LOGIC ); - -psb_enable_pipestat (dev_priv,0 ,PIPE_DPST_EVENT_ENABLE ); - - hist_reg =PSB_RVDC32 (HISTOGRAM_INT_CONTROL ); -PSB_WVDC32 (hist_reg |HISTOGRAM_INT_CTRL_CLEAR , -HISTOGRAM_INT_CONTROL ); - pwm_reg =PSB_RVDC32 (PWM_CONTROL_LOGIC ); -PSB_WVDC32 (pwm_reg |0x80010100 |PWM_PHASEIN_ENABLE , -PWM_CONTROL_LOGIC ); - -gma_power_end (dev); - } -} - -int psb_irq_enable_dpst (struct drm_device *dev) -{ -struct drm_psb_private *dev_priv = - (struct drm_psb_private *) dev->dev_private; -unsigned long irqflags; - -spin_lock_irqsave (&dev_priv->irqmask_lock, irqflags); - -/* enable DPST */ -mid_enable_pipe_event (dev_priv,0 ); -psb_irq_turn_on_dpst (dev); - -spin_unlock_irqrestore (&dev_priv->irqmask_lock, irqflags); -return 0 ; -} - -void psb_irq_turn_off_dpst (struct drm_device *dev) -{ -struct drm_psb_private *dev_priv = - (struct drm_psb_private *) dev->dev_private; -u32 pwm_reg; - -if (gma_power_begin (dev, false)) { -PSB_WVDC32 (0x00000000 ,HISTOGRAM_INT_CONTROL ); -PSB_RVDC32 (HISTOGRAM_INT_CONTROL ); - -psb_disable_pipestat (dev_priv,0 ,PIPE_DPST_EVENT_ENABLE ); - - pwm_reg =PSB_RVDC32 (PWM_CONTROL_LOGIC ); -PSB_WVDC32 (pwm_reg & ~PWM_PHASEIN_INT_ENABLE , -PWM_CONTROL_LOGIC ); - pwm_reg =PSB_RVDC32 (PWM_CONTROL_LOGIC ); - -gma_power_end (dev); - } -} - -int psb_irq_disable_dpst (struct drm_device *dev) -{ -struct drm_psb_private *dev_priv = - (struct drm_psb_private *) dev->dev_private; -unsigned long irqflags; - -spin_lock_irqsave (&dev_priv->irqmask_lock, irqflags); - -mid_disable_pipe_event (dev_priv,0 ); -psb_irq_turn_off_dpst (dev); - -spin_unlock_irqrestore (&dev_priv->irqmask_lock, irqflags); - -return 0 ; -} -/* * It is used to enable VBLANK interrupt */ drivers/gpu/drm/gma500/psb_irq.h +0
-4@@ -23,10 +23,6 @@ int psb_irq_postinstall(struct drm_device *dev);void psb_irq_uninstall (struct drm_device *dev);irqreturn_t psb_irq_handler (int irq,void *arg); -int psb_irq_enable_dpst (struct drm_device *dev); -int psb_irq_disable_dpst (struct drm_device *dev); -void psb_irq_turn_on_dpst (struct drm_device *dev); -void psb_irq_turn_off_dpst (struct drm_device *dev);int psb_enable_vblank (struct drm_crtc *crtc);void psb_disable_vblank (struct drm_crtc *crtc);u32 psb_get_vblank_counter (struct drm_crtc *crtc);
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerPATCH 3/6 drm/gma500/cdv: Remove unused tv out paths
In reply to Patrik JakobssonAfaik tv out is not available on Cedarview and the code isn't doing anything so remove it.
--- drivers/gpu/drm/gma500/cdv_intel_display.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/gpu/drm/gma500/cdv_intel_display.c +1 -10
@@ -582,7 +582,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,struct gma_clock_t clock;u32 dpll =0 , dspcntr, pipeconf;bool ok; -bool is_lvds = false, is_tv = false; +bool is_lvds = false;bool is_dp = false;struct drm_mode_config *mode_config = &dev->mode_config;struct drm_connector *connector;
@@ -603,9 +603,6 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,case INTEL_OUTPUT_LVDS : is_lvds = true;break ; -case INTEL_OUTPUT_TVOUT : - is_tv = true; -break ;case INTEL_OUTPUT_ANALOG :case INTEL_OUTPUT_HDMI :break ;
@@ -660,12 +657,6 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, } dpll =DPLL_VGA_MODE_DIS ; -if (is_tv) { -/* XXX: just matching BIOS for now */ -/* dpll |= PLL_REF_INPUT_TVCLKINBC; */ - dpll |=3 ; - } -/* dpll |= PLL_REF_INPUT_DREFCLK; */ if (is_dp || is_edp) {cdv_intel_dp_set_m_n (crtc, mode, adjusted_mode);
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/6] drm/gma500/cdv: Remove unused tv out paths
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 4 lines
Afaik tv out is not available on Cedarview and the code isn't doing anything so remove it.
Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 41 lines
--- drivers/gpu/drm/gma500/cdv_intel_display.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)drivers/gpu/drm/gma500/cdv_intel_display.c +1
-10@@ -582,7 +582,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,struct gma_clock_t clock;u32 dpll =0 , dspcntr, pipeconf;bool ok; -bool is_lvds = false, is_tv = false; +bool is_lvds = false;bool is_dp = false;struct drm_mode_config *mode_config = &dev->mode_config;struct drm_connector *connector;@@ -603,9 +603,6 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,case INTEL_OUTPUT_LVDS : is_lvds = true;break ; -case INTEL_OUTPUT_TVOUT : - is_tv = true; -break ;case INTEL_OUTPUT_ANALOG :case INTEL_OUTPUT_HDMI :break ;@@ -660,12 +657,6 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc, } dpll =DPLL_VGA_MODE_DIS ; -if (is_tv) { -/* XXX: just matching BIOS for now */ -/* dpll |= PLL_REF_INPUT_TVCLKINBC; */ - dpll |=3 ; - } -/* dpll |= PLL_REF_INPUT_DREFCLK; */ if (is_dp || is_edp) {cdv_intel_dp_set_m_n (crtc, mode, adjusted_mode);
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerPATCH 4/6 drm/gma500: Unify crtc helpers
In reply to Patrik JakobssonCDV crtc helpers are identical to other chips so use gma_ prefix for the crtc helper struct and remove the CDV copy.
--- drivers/gpu/drm/gma500/cdv_device.c | 2 +- drivers/gpu/drm/gma500/cdv_device.h | 1 - drivers/gpu/drm/gma500/cdv_intel_display.c | 12 ------------ drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_display.c | 2 +- 7 files changed, 5 insertions(+), 18 deletions(-)
drivers/gpu/drm/gma500/cdv_device.c +1 -1
@@ -603,7 +603,7 @@ const struct psb_ops cdv_chip_ops = { .errata = cdv_errata, .crtc_helper = &cdv_intel_helper_funcs, - .crtc_funcs = &cdv_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .clock_funcs = &cdv_clock_funcs, .output_init = cdv_output_init,
drivers/gpu/drm/gma500/cdv_device.h +0 -1
@@ -8,7 +8,6 @@ struct drm_device;struct psb_intel_mode_device ;extern const struct drm_crtc_helper_funcs cdv_intel_helper_funcs; -extern const struct drm_crtc_funcs cdv_intel_crtc_funcs;extern const struct gma_clock_funcs cdv_clock_funcs;extern void cdv_intel_crt_init (struct drm_device *dev,struct psb_intel_mode_device *mode_dev);
drivers/gpu/drm/gma500/cdv_intel_display.c +0 -12
@@ -961,18 +961,6 @@ const struct drm_crtc_helper_funcs cdv_intel_helper_funcs = { .disable = gma_crtc_disable, }; -const struct drm_crtc_funcs cdv_intel_crtc_funcs = { - .cursor_set = gma_crtc_cursor_set, - .cursor_move = gma_crtc_cursor_move, - .gamma_set = gma_crtc_gamma_set, - .set_config = gma_crtc_set_config, - .destroy = gma_crtc_destroy, - .page_flip = gma_crtc_page_flip, - .enable_vblank = psb_enable_vblank, - .disable_vblank = psb_disable_vblank, - .get_vblank_counter = psb_get_vblank_counter, -}; -const struct gma_clock_funcs cdv_clock_funcs = { .clock = cdv_intel_clock, .limit = cdv_intel_limit,
drivers/gpu/drm/gma500/oaktrail_device.c +1 -1
@@ -548,7 +548,7 @@ const struct psb_ops oaktrail_chip_ops = { .chip_setup = oaktrail_chip_setup, .chip_teardown = oaktrail_teardown, .crtc_helper = &oaktrail_helper_funcs, - .crtc_funcs = &psb_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .output_init = oaktrail_output_init,
drivers/gpu/drm/gma500/psb_device.c +1 -1
@@ -329,7 +329,7 @@ const struct psb_ops psb_chip_ops = { .chip_teardown = psb_chip_teardown, .crtc_helper = &psb_intel_helper_funcs, - .crtc_funcs = &psb_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .clock_funcs = &psb_clock_funcs, .output_init = psb_output_init,
drivers/gpu/drm/gma500/psb_drv.h +1 -1
@@ -672,7 +672,7 @@ extern void oaktrail_lvds_init(struct drm_device *dev,/* psb_intel_display.c */ extern const struct drm_crtc_helper_funcs psb_intel_helper_funcs; -extern const struct drm_crtc_funcs psb_intel_crtc_funcs; +extern const struct drm_crtc_funcs gma_intel_crtc_funcs;/* psb_intel_lvds.c */ extern const struct drm_connector_helper_funcs
drivers/gpu/drm/gma500/psb_intel_display.c +1 -1
@@ -426,7 +426,7 @@ const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { .disable = gma_crtc_disable, }; -const struct drm_crtc_funcs psb_intel_crtc_funcs = { +const struct drm_crtc_funcs gma_intel_crtc_funcs = { .cursor_set = gma_crtc_cursor_set, .cursor_move = gma_crtc_cursor_move, .gamma_set = gma_crtc_gamma_set,
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/6] drm/gma500: Unify crtc helpers
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 4 lines
CDV crtc helpers are identical to other chips so use
gma_prefix for the crtc helper struct and remove the CDV copy.Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 111 lines
--- drivers/gpu/drm/gma500/cdv_device.c | 2 +- drivers/gpu/drm/gma500/cdv_device.h | 1 - drivers/gpu/drm/gma500/cdv_intel_display.c | 12 ------------ drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_display.c | 2 +- 7 files changed, 5 insertions(+), 18 deletions(-)drivers/gpu/drm/gma500/cdv_device.c +1
-1@@ -603,7 +603,7 @@ const struct psb_ops cdv_chip_ops = { .errata = cdv_errata, .crtc_helper = &cdv_intel_helper_funcs, - .crtc_funcs = &cdv_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .clock_funcs = &cdv_clock_funcs, .output_init = cdv_output_init,drivers/gpu/drm/gma500/cdv_device.h +0
-1@@ -8,7 +8,6 @@ struct drm_device;struct psb_intel_mode_device ;extern const struct drm_crtc_helper_funcs cdv_intel_helper_funcs; -extern const struct drm_crtc_funcs cdv_intel_crtc_funcs;extern const struct gma_clock_funcs cdv_clock_funcs;extern void cdv_intel_crt_init (struct drm_device *dev,struct psb_intel_mode_device *mode_dev);drivers/gpu/drm/gma500/cdv_intel_display.c +0
-12@@ -961,18 +961,6 @@ const struct drm_crtc_helper_funcs cdv_intel_helper_funcs = { .disable = gma_crtc_disable, }; -const struct drm_crtc_funcs cdv_intel_crtc_funcs = { - .cursor_set = gma_crtc_cursor_set, - .cursor_move = gma_crtc_cursor_move, - .gamma_set = gma_crtc_gamma_set, - .set_config = gma_crtc_set_config, - .destroy = gma_crtc_destroy, - .page_flip = gma_crtc_page_flip, - .enable_vblank = psb_enable_vblank, - .disable_vblank = psb_disable_vblank, - .get_vblank_counter = psb_get_vblank_counter, -}; -const struct gma_clock_funcs cdv_clock_funcs = { .clock = cdv_intel_clock, .limit = cdv_intel_limit,drivers/gpu/drm/gma500/oaktrail_device.c +1
-1@@ -548,7 +548,7 @@ const struct psb_ops oaktrail_chip_ops = { .chip_setup = oaktrail_chip_setup, .chip_teardown = oaktrail_teardown, .crtc_helper = &oaktrail_helper_funcs, - .crtc_funcs = &psb_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .output_init = oaktrail_output_init,drivers/gpu/drm/gma500/psb_device.c +1
-1@@ -329,7 +329,7 @@ const struct psb_ops psb_chip_ops = { .chip_teardown = psb_chip_teardown, .crtc_helper = &psb_intel_helper_funcs, - .crtc_funcs = &psb_intel_crtc_funcs, + .crtc_funcs = &gma_intel_crtc_funcs, .clock_funcs = &psb_clock_funcs, .output_init = psb_output_init,drivers/gpu/drm/gma500/psb_drv.h +1
-1@@ -672,7 +672,7 @@ extern void oaktrail_lvds_init(struct drm_device *dev,/* psb_intel_display.c */ extern const struct drm_crtc_helper_funcs psb_intel_helper_funcs; -extern const struct drm_crtc_funcs psb_intel_crtc_funcs; +extern const struct drm_crtc_funcs gma_intel_crtc_funcs;/* psb_intel_lvds.c */ extern const struct drm_connector_helper_funcsdrivers/gpu/drm/gma500/psb_intel_display.c +1
-1@@ -426,7 +426,7 @@ const struct drm_crtc_helper_funcs psb_intel_helper_funcs = { .disable = gma_crtc_disable, }; -const struct drm_crtc_funcs psb_intel_crtc_funcs = { +const struct drm_crtc_funcs gma_intel_crtc_funcs = { .cursor_set = gma_crtc_cursor_set, .cursor_move = gma_crtc_cursor_move, .gamma_set = gma_crtc_gamma_set,
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerPATCH 5/6 drm/gma500: psb_spank() doesn't need it's own file
In reply to Patrik JakobssonSince everything else in accel_2d.c got removed we can move psb_spank() into psb_drv.c where it is used.
--- drivers/gpu/drm/gma500/Makefile | 1 - drivers/gpu/drm/gma500/accel_2d.c | 60 ------------------------------- drivers/gpu/drm/gma500/psb_drv.c | 31 ++++++++++++++++ 3 files changed, 31 insertions(+), 61 deletions(-) delete mode 100644 drivers/gpu/drm/gma500/accel_2d.c
drivers/gpu/drm/gma500/Makefile +0 -1
@@ -4,7 +4,6 @@ # gma500_gfx-y += \ - accel_2d.o \ backlight.o \ blitter.o \ cdv_device.o \
drivers/gpu/drm/gma500/accel_2d.c deleted +0 -60
60 lines not on this page · raw message
drivers/gpu/drm/gma500/psb_drv.c +31 -0
@@ -12,6 +12,7 @@#include <linux/notifier.h> #include <linux/pm_runtime.h> #include <linux/spinlock.h> +#include <linux/delay.h> #include <asm/set_memory.h>
@@ -92,6 +93,36 @@ MODULE_DEVICE_TABLE(pci, pciidlist);static const struct drm_ioctl_desc psb_ioctls[] = { }; +/** +* psb_spank - reset the 2D engine +* @dev_priv: our PSB DRM device +* +* Soft reset the graphics engine and then reload the necessary registers. +*/ +void psb_spank (struct drm_psb_private *dev_priv) +{ +PSB_WSGX32 (_PSB_CS_RESET_BIF_RESET | _PSB_CS_RESET_DPM_RESET | + _PSB_CS_RESET_TA_RESET | _PSB_CS_RESET_USE_RESET | + _PSB_CS_RESET_ISP_RESET | _PSB_CS_RESET_TSP_RESET | + _PSB_CS_RESET_TWOD_RESET,PSB_CR_SOFT_RESET ); +PSB_RSGX32 (PSB_CR_SOFT_RESET ); + +msleep (1 ); + +PSB_WSGX32 (0 ,PSB_CR_SOFT_RESET ); +wmb (); +PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) | _PSB_CB_CTRL_CLEAR_FAULT, +PSB_CR_BIF_CTRL ); +wmb (); + (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); + +msleep (1 ); +PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) & ~_PSB_CB_CTRL_CLEAR_FAULT, +PSB_CR_BIF_CTRL ); + (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); +PSB_WSGX32 (dev_priv->gtt.gatt_start,PSB_CR_BIF_TWOD_REQ_BASE ); +} +static int psb_do_init (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 5/6] drm/gma500: psb_spank() doesn't need it's own file
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 2 lines
Since everything else in
accel_2d.cgot removed we can movepsb_spank()intopsb_drv.cwhere it is used.
Nit: I think one says 'it is being used'.
Quoted 2 lines
Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 135 lines
--- drivers/gpu/drm/gma500/Makefile | 1 - drivers/gpu/drm/gma500/accel_2d.c | 60 ------------------------------- drivers/gpu/drm/gma500/psb_drv.c | 31 ++++++++++++++++ 3 files changed, 31 insertions(+), 61 deletions(-)delete mode 100644
drivers/gpu/drm/gma500/accel_2d.cdrivers/gpu/drm/gma500/Makefile +0
-1@@ -4,7 +4,6 @@ # gma500_gfx-y += \ - accel_2d.o \ backlight.o \ blitter.o \ cdv_device.o \drivers/gpu/drm/gma500/accel_2d.c deleted +0
-60@@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/************************************************************************** -* Copyright (c) 2007-2011, Intel Corporation. -* All Rights Reserved. -* -* Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to -* develop this driver. -* -**************************************************************************/ - -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/module.h> -#include <linux/slab.h> -#include <linux/string.h> -#include <linux/tty.h> - -#include <drm/drm.h> -#include <drm/drm_crtc.h> -#include <drm/drm_fb_helper.h> -#include <drm/drm_fourcc.h> - -#include "psb_drv.h" -#include "psb_reg.h" - -/** -* psb_spank - reset the 2D engine -* @dev_priv: our PSB DRM device -* -* Soft reset the graphics engine and then reload the necessary registers. -* We use this at initialisation time but it will become relevant for -* accelerated X later -*/ -void psb_spank (struct drm_psb_private *dev_priv) -{ -PSB_WSGX32 (_PSB_CS_RESET_BIF_RESET | _PSB_CS_RESET_DPM_RESET | - _PSB_CS_RESET_TA_RESET | _PSB_CS_RESET_USE_RESET | - _PSB_CS_RESET_ISP_RESET | _PSB_CS_RESET_TSP_RESET | - _PSB_CS_RESET_TWOD_RESET,PSB_CR_SOFT_RESET ); -PSB_RSGX32 (PSB_CR_SOFT_RESET ); - -msleep (1 ); - -PSB_WSGX32 (0 ,PSB_CR_SOFT_RESET ); -wmb (); -PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) | _PSB_CB_CTRL_CLEAR_FAULT, -PSB_CR_BIF_CTRL ); -wmb (); - (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); - -msleep (1 ); -PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) & ~_PSB_CB_CTRL_CLEAR_FAULT, -PSB_CR_BIF_CTRL ); - (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); -PSB_WSGX32 (dev_priv->gtt.gatt_start,PSB_CR_BIF_TWOD_REQ_BASE ); -}drivers/gpu/drm/gma500/psb_drv.c +31
-0@@ -12,6 +12,7 @@#include <linux/notifier.h> #include <linux/pm_runtime.h> #include <linux/spinlock.h> +#include <linux/delay.h> #include <asm/set_memory.h> @@ -92,6 +93,36 @@ MODULE_DEVICE_TABLE(pci, pciidlist);static const struct drm_ioctl_desc psb_ioctls[] = { }; +/** +* psb_spank - reset the 2D engine +* @dev_priv: our PSB DRM device +* +* Soft reset the graphics engine and then reload the necessary registers. +*/ +void psb_spank (struct drm_psb_private *dev_priv) +{ +PSB_WSGX32 (_PSB_CS_RESET_BIF_RESET | _PSB_CS_RESET_DPM_RESET | + _PSB_CS_RESET_TA_RESET | _PSB_CS_RESET_USE_RESET | + _PSB_CS_RESET_ISP_RESET | _PSB_CS_RESET_TSP_RESET | + _PSB_CS_RESET_TWOD_RESET,PSB_CR_SOFT_RESET ); +PSB_RSGX32 (PSB_CR_SOFT_RESET ); + +msleep (1 ); + +PSB_WSGX32 (0 ,PSB_CR_SOFT_RESET ); +wmb (); +PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) | _PSB_CB_CTRL_CLEAR_FAULT, +PSB_CR_BIF_CTRL ); +wmb (); + (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); + +msleep (1 ); +PSB_WSGX32 (PSB_RSGX32 (PSB_CR_BIF_CTRL ) & ~_PSB_CB_CTRL_CLEAR_FAULT, +PSB_CR_BIF_CTRL ); + (void )PSB_RSGX32 (PSB_CR_BIF_CTRL ); +PSB_WSGX32 (dev_priv->gtt.gatt_start,PSB_CR_BIF_TWOD_REQ_BASE ); +} +static int psb_do_init (struct drm_device *dev) {struct drm_psb_private *dev_priv = dev->dev_private;
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerPATCH 6/6 drm/gma500: Never wait for blits
In reply to Patrik JakobssonBlits cannot happen anymore since we removed the 2d accel code. Stop checking for a busy blitter and remove the remaining blitter code.
--- drivers/gpu/drm/gma500/Makefile | 1 - drivers/gpu/drm/gma500/blitter.c | 43 -------------------------------- drivers/gpu/drm/gma500/blitter.h | 16 ------------ drivers/gpu/drm/gma500/gtt.c | 11 -------- 4 files changed, 71 deletions(-) delete mode 100644 drivers/gpu/drm/gma500/blitter.c delete mode 100644 drivers/gpu/drm/gma500/blitter.h
drivers/gpu/drm/gma500/Makefile +0 -1
@@ -5,7 +5,6 @@ gma500_gfx-y += \ backlight.o \ - blitter.o \ cdv_device.o \ cdv_intel_crt.o \ cdv_intel_display.o \
drivers/gpu/drm/gma500/blitter.c deleted +0 -43
43 lines not on this page · raw message
drivers/gpu/drm/gma500/blitter.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* Copyright (c) 2014, Patrik Jakobsson -* All Rights Reserved. -* -* Authors: Patrik Jakobsson <[email protected]> -*/ - -#ifndef __BLITTER_H -#define __BLITTER_H - -struct drm_psb_private ; - -extern int gma_blt_wait_idle (struct drm_psb_private *dev_priv); - -#endif
drivers/gpu/drm/gma500/gtt.c +0 -11
@@ -11,7 +11,6 @@#include <asm/set_memory.h> -#include "blitter.h" #include "psb_drv.h"
@@ -229,18 +228,9 @@ void psb_gtt_unpin(struct gtt_range *gt)struct drm_device *dev = gt->gem.dev;struct drm_psb_private *dev_priv = dev->dev_private;u32 gpu_base = dev_priv->gtt.gatt_start; -int ret; -/* While holding the gtt_mutex no new blits can be initiated */ mutex_lock (&dev_priv->gtt_mutex); -/* Wait for any possible usage of the memory to be finished */ - ret =gma_blt_wait_idle (dev_priv); -if (ret) { -DRM_ERROR ("Failed to idle the blitter, unpin failed!" ); - goto out; - } -WARN_ON (!gt->in_gart); gt->in_gart--;
@@ -251,7 +241,6 @@ void psb_gtt_unpin(struct gtt_range *gt)psb_gtt_detach_pages (gt); } -out:mutex_unlock (&dev_priv->gtt_mutex); }
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 6/6] drm/gma500: Never wait for blits
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 4 lines
Blits cannot happen anymore since we removed the 2d accel code. Stop checking for a busy blitter and remove the remaining blitter code.
Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 132 lines
--- drivers/gpu/drm/gma500/Makefile | 1 - drivers/gpu/drm/gma500/blitter.c | 43 -------------------------------- drivers/gpu/drm/gma500/blitter.h | 16 ------------ drivers/gpu/drm/gma500/gtt.c | 11 -------- 4 files changed, 71 deletions(-)delete mode 100644
drivers/gpu/drm/gma500/blitter.cdelete mode 100644drivers/gpu/drm/gma500/blitter.hdrivers/gpu/drm/gma500/Makefile +0
-1@@ -5,7 +5,6 @@ gma500_gfx-y += \ backlight.o \ - blitter.o \ cdv_device.o \ cdv_intel_crt.o \ cdv_intel_display.o \drivers/gpu/drm/gma500/blitter.c deleted +0
-43@@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* -* Copyright (c) 2014, Patrik Jakobsson -* All Rights Reserved. -* -* Authors: Patrik Jakobsson <[email protected]> -*/ - -#include "psb_drv.h" - -#include "blitter.h" -#include "psb_reg.h" - -/* Wait for the blitter to be completely idle */ -int gma_blt_wait_idle (struct drm_psb_private *dev_priv) -{ -unsigned long stop = jiffies +HZ ; -int busy =1 ; - -/* NOP for Cedarview */ -if (IS_CDV (dev_priv->dev)) -return 0 ; - -/* First do a quick check */ -if ((PSB_RSGX32 (PSB_CR_2D_SOCIF ) == _PSB_C2_SOCIF_EMPTY) && - ((PSB_RSGX32 (PSB_CR_2D_BLIT_STATUS ) & _PSB_C2B_STATUS_BUSY) ==0 )) -return 0 ; - -do { - busy = (PSB_RSGX32 (PSB_CR_2D_SOCIF ) != _PSB_C2_SOCIF_EMPTY); - }while (busy && !time_after_eq (jiffies, stop)); - -if (busy) -return -EBUSY ; - -do { - busy = ((PSB_RSGX32 (PSB_CR_2D_BLIT_STATUS ) & - _PSB_C2B_STATUS_BUSY) !=0 ); - }while (busy && !time_after_eq (jiffies, stop)); - -/* If still busy, we probably have a hang */ -return (busy) ? -EBUSY :0 ; -}drivers/gpu/drm/gma500/blitter.h deleted +0
-16@@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* Copyright (c) 2014, Patrik Jakobsson -* All Rights Reserved. -* -* Authors: Patrik Jakobsson <[email protected]> -*/ - -#ifndef __BLITTER_H -#define __BLITTER_H - -struct drm_psb_private ; - -extern int gma_blt_wait_idle (struct drm_psb_private *dev_priv); - -#endif drivers/gpu/drm/gma500/gtt.c +0
-11@@ -11,7 +11,6 @@#include <asm/set_memory.h> -#include "blitter.h" #include "psb_drv.h" @@ -229,18 +228,9 @@ void psb_gtt_unpin(struct gtt_range *gt)struct drm_device *dev = gt->gem.dev;struct drm_psb_private *dev_priv = dev->dev_private;u32 gpu_base = dev_priv->gtt.gatt_start; -int ret; -/* While holding the gtt_mutex no new blits can be initiated */ mutex_lock (&dev_priv->gtt_mutex); -/* Wait for any possible usage of the memory to be finished */ - ret =gma_blt_wait_idle (dev_priv); -if (ret) { -DRM_ERROR ("Failed to idle the blitter, unpin failed!" ); - goto out; - } -WARN_ON (!gt->in_gart); gt->in_gart--;@@ -251,7 +241,6 @@ void psb_gtt_unpin(struct gtt_range *gt)psb_gtt_detach_pages (gt); } -out:mutex_unlock (&dev_priv->gtt_mutex); }
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 01.02.21 um 14:26 schrieb Patrik Jakobsson:
Quoted 3 lines
Clearly never been used so just remove it.
Signed-off-by Patrik Jakobsson <[email protected]>
Quoted 44 lines
--- drivers/gpu/drm/gma500/cdv_intel_crt.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)drivers/gpu/drm/gma500/cdv_intel_crt.c +1
-14@@ -248,8 +248,6 @@ void cdv_intel_crt_init(struct drm_device *dev,struct drm_connector *connector;struct drm_encoder *encoder; -u32 i2c_reg; - gma_encoder =kzalloc (sizeof (struct gma_encoder ),GFP_KERNEL );if (!gma_encoder)return ;@@ -269,24 +267,13 @@ void cdv_intel_crt_init(struct drm_device *dev,gma_connector_attach_encoder (gma_connector, gma_encoder);/* Set up the DDC bus. */ - i2c_reg =GPIOA ; -/* Remove the following code for CDV */ -/* -if (dev_priv->crt_ddc_bus != 0) -i2c_reg = dev_priv->crt_ddc_bus; -}*/ - gma_encoder->ddc_bus =psb_intel_i2c_create (dev, - i2c_reg,"CRTDDC_A" ); + gma_encoder->ddc_bus =psb_intel_i2c_create (dev,GPIOA ,"CRTDDC_A" );if (!gma_encoder->ddc_bus) {dev_printk (KERN_ERR , dev->dev,"DDC bus registration failed.\n" ); goto failed_ddc; } gma_encoder->type =INTEL_OUTPUT_ANALOG ; -/* -psb_intel_output->clone_mask = (1 << INTEL_ANALOG_CLONE_BIT); -psb_intel_output->crtc_mask = (1 << 0) | (1 << 1); -*/ connector->interlace_allowed =0 ; connector->doublescan_allowed =0 ;
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel