Misc DAL & amdkfd cleanups on top of drm-next-4.7-wip-dal
Subsystems (3)
The following series applies on top of the 'drm-next-4.7-wip-dal' branch. One patch has already been reviewed, however I have included it again here for completeness. The is the first of, I hope, further work from me in helping the mainlining of DAL and improving amdkfd compute to work out the box for us HPC folks. Please review.
Thanks for your time,
Edward O'Callaghan (9):
amdgpu/dal: Kill off stale dal directories amdgpu/dal: Kill off stub amdgpu_dm_*_dal_lock() symbols amdgpu/dal: Kill off stub dal_isr_*_lock() symbols amdgpu/dal: Use the canonical form in branch predicates amdgpu/dal: Use true/false over integers for boolean vars amdgpu/dal: Drop spurious double ';' at the end of lines
amdkfd: Use the canonical form in branch predicates
amdkfd: Trim off unnescessary semicolon from
amdkfd: Trim unnescessary intermediate err var in
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/9 amdgpu/dal: Kill off stale dal directories
--- drivers/gpu/drm/amd/dal/utils/bw_calc_test_harness/.gitignore | 4 ---- drivers/gpu/drm/amd/dal/utils/vba_to_c_converter/.gitignore | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 drivers/gpu/drm/amd/dal/utils/bw_calc_test_harness/.gitignore delete mode 100644 drivers/gpu/drm/amd/dal/utils/vba_to_c_converter/.gitignore
drivers/gpu/drm/amd/dal/utils/bw_calc_test_harness/.gitignore deleted +0 -4
@@ -1,4 +0,0 @@ -x64 -Debug -*.user -*.sdf
drivers/gpu/drm/amd/dal/utils/vba_to_c_converter/.gitignore deleted +0 -4
@@ -1,4 +0,0 @@ -bin -obj -*.user -*.sdf
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/9 amdgpu/dal: Kill off stub amdgpu_dm_*_dal_lock() symbols
In reply to Edward O'CallaghanThere are no call sites for these nor do they do anything but return a boolean true. For now avoid the clutter.
--- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c | 14 -------------- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.h | 5 ----- 2 files changed, 19 deletions(-)
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c +0 -14
@@ -1379,17 +1379,3 @@ static int dm_early_init(void *handle)return 0 ; } - -bool amdgpu_dm_acquire_dal_lock (struct amdgpu_display_manager *dm) -{ -/* TODO */ -return true; -} - -bool amdgpu_dm_release_dal_lock (struct amdgpu_display_manager *dm) -{ -/* TODO */ -return true; -} - -
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.h +0 -5
@@ -148,11 +148,6 @@ int amdgpu_dm_initialize_drm_device(void amdgpu_dm_destroy_drm_device (struct amdgpu_display_manager *dm); -/* Locking/Mutex */ -bool amdgpu_dm_acquire_dal_lock (struct amdgpu_display_manager *dm); - -bool amdgpu_dm_release_dal_lock (struct amdgpu_display_manager *dm); -/* Register "Backlight device" accessible by user-mode. */ void amdgpu_dm_register_backlight_device (struct amdgpu_display_manager *dm);
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/9 amdgpu/dal: Kill off stub dal_isr_*_lock() symbols
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_services.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_services.c +0 -10
@@ -67,16 +67,6 @@ void dal_register_timer_interrupt(amdgpu_dm_irq_register_timer (adev, int_params, ih, args); } -void dal_isr_acquire_lock (struct dc_context *ctx) -{ -/*TODO*/ -} - -void dal_isr_release_lock (struct dc_context *ctx) -{ -/*TODO*/ -} -/****************************************************************************** * End-of-IRQ Interfaces. *****************************************************************************/
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/9 amdgpu/dal: Use the canonical form in branch predicates
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_irq.c | 8 ++++---- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 2 +- drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c | 2 +- drivers/gpu/drm/amd/dal/dc/audio/dce110/hw_ctx_audio_dce110.c | 2 +- drivers/gpu/drm/amd/dal/dc/audio/dce112/hw_ctx_audio_dce112.c | 2 +- drivers/gpu/drm/amd/dal/dc/audio/dce80/hw_ctx_audio_dce80.c | 2 +- drivers/gpu/drm/amd/dal/dc/basics/grph_object_id.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/basics/register_logger.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/bios/command_table.c | 6 +++--- drivers/gpu/drm/amd/dal/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c | 6 +++--- drivers/gpu/drm/amd/dal/dc/core/dc_stream.c | 2 +- drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/dal/dc/dce110/dce110_link_encoder.c | 2 +- drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c | 6 +++--- drivers/gpu/drm/amd/dal/dc/dce80/dce80_transform_bit_depth.c | 4 ++-- drivers/gpu/drm/amd/dal/include/logger_interface.h | 2 +- 17 files changed, 30 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_irq.c +4 -4
@@ -156,7 +156,7 @@ static struct list_head *remove_irq_handler(DM_IRQ_TABLE_UNLOCK (adev, irq_table_flags); -if (handler_removed == false) { +if (!handler_removed) {/* Not necessarily an error - caller may not * know the context. */ return NULL ;
@@ -225,7 +225,7 @@ static void remove_timer_handler(DM_IRQ_TABLE_UNLOCK (adev, irq_table_flags); -if (handler_in !=NULL && handler_removed == false) { +if (handler_in !=NULL && !handler_removed) {DRM_ERROR ("DM_IRQ: handler: %p is not in the list!\n" , handler_in); }
@@ -310,7 +310,7 @@ void *amdgpu_dm_irq_register_interrupt(unsigned long irq_table_flags;enum dc_irq_source irq_source; -if (false ==validate_irq_registration_params (int_params, ih)) +if (!validate_irq_registration_params (int_params, ih))return DAL_INVALID_IRQ_HANDLER_IDX ; handler_data =kzalloc (sizeof (*handler_data),GFP_KERNEL );
@@ -368,7 +368,7 @@ void amdgpu_dm_irq_unregister_interrupt(struct dc_interrupt_params int_params;int i; -if (false ==validate_irq_unregistration_params (irq_source, ih)) +if (!validate_irq_unregistration_params (irq_source, ih))return ;memset (&int_params,0 ,sizeof (int_params));
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +1 -1
@@ -2665,7 +2665,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, } -if (need_to_validate == false || set_count ==0 || +if (!need_to_validate || set_count ==0 ||dc_validate_resources (dc, set, set_count)) ret =0 ;
drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c +1 -1
@@ -136,7 +136,7 @@ static bool construct(break ; } -if (false == asic_supported) { +if (!asic_supported) { dal_logger_write(ctx->logger, LOG_MAJOR_ERROR, LOG_MINOR_MASK_ALL,
drivers/gpu/drm/amd/dal/dc/audio/dce110/hw_ctx_audio_dce110.c +1 -1
@@ -1514,7 +1514,7 @@ static void setup_channel_splitting_mapping( value = audio_mapping->u32all; -if (enable == false) +if (!enable)/*0xFFFFFFFF;*/ value =MULTI_CHANNEL_SPLIT_NO_ASSO_INFO ;
drivers/gpu/drm/amd/dal/dc/audio/dce112/hw_ctx_audio_dce112.c +1 -1
@@ -1521,7 +1521,7 @@ static void setup_channel_splitting_mapping( value = audio_mapping->u32all; -if (enable == false) +if (!enable)/*0xFFFFFFFF;*/ value =MULTI_CHANNEL_SPLIT_NO_ASSO_INFO ;
drivers/gpu/drm/amd/dal/dc/audio/dce80/hw_ctx_audio_dce80.c +1 -1
@@ -1448,7 +1448,7 @@ static void setup_channel_splitting_mapping( value = audio_mapping->u32all; -if (enable == false) +if (!enable)/*0xFFFFFFFF;*/ value =MULTI_CHANNEL_SPLIT_NO_ASSO_INFO ;
drivers/gpu/drm/amd/dal/dc/basics/grph_object_id.c +2 -2
@@ -53,13 +53,13 @@ bool dal_graphics_object_id_is_equal( struct graphics_object_id id1, struct graphics_object_id id2) { - if (false == dal_graphics_object_id_is_valid(id1)) { +if (!dal_graphics_object_id_is_valid (id1)) {dm_output_to_console ("%s: Warning: comparing invalid object 'id1'!\n" , __func__);return false; } -if (false ==dal_graphics_object_id_is_valid (id2)) { +if (!dal_graphics_object_id_is_valid (id2)) {dm_output_to_console ("%s: Warning: comparing invalid object 'id2'!\n" , __func__);return false;
drivers/gpu/drm/amd/dal/dc/basics/register_logger.c +2 -2
@@ -183,10 +183,10 @@ void dal_reg_logger_rw_count_increment(void)bool dal_reg_logger_should_dump_register (void ) { -if (true ==dal_reg_dump_stack_is_empty ()) +if (dal_reg_dump_stack_is_empty ())return false; -if (false ==is_reg_dump_process ()) +if (!is_reg_dump_process ())return false;return true;
drivers/gpu/drm/amd/dal/dc/bios/command_table.c +3 -3
@@ -1341,7 +1341,7 @@ static enum bp_result enable_spread_spectrum_on_ppll_v1(memset (¶ms,0 ,sizeof (params)); -if ((enable == true) && (bp_params->percentage >0 )) +if ((enable) && (bp_params->percentage >0 )) params.ucEnable =ATOM_ENABLE ;else params.ucEnable =ATOM_DISABLE ;
@@ -1392,7 +1392,7 @@ static enum bp_result enable_spread_spectrum_on_ppll_v2(else BREAK_TO_DEBUGGER ();/* Unexpected PLL value!! */ -if ((enable == true) && (bp_params->percentage >0 )) { +if ((enable) && (bp_params->percentage >0 )) { params.ucEnable =ATOM_ENABLE ; params.usSpreadSpectrumPercentage =
@@ -1462,7 +1462,7 @@ static enum bp_result enable_spread_spectrum_on_ppll_v3(return result; } -if (enable == true) { +if (enable) { params.ucEnable =ATOM_ENABLE ; params.usSpreadSpectrumAmountFrac =
drivers/gpu/drm/amd/dal/dc/core/dc_link.c +2 -2
@@ -564,7 +564,7 @@ bool dc_link_detect(const struct dc_link *dc_link, bool boot)if (link->public.connector_signal ==SIGNAL_TYPE_VIRTUAL )return false; -if (false ==detect_sink (link, &new_connection_type)) { +if (!detect_sink (link, &new_connection_type)) {BREAK_TO_DEBUGGER ();return false; }
@@ -1090,7 +1090,7 @@ struct core_link *link_create(const struct link_init_data *init_params)if (NULL == link) goto alloc_fail; -if (false ==construct (link, init_params)) +if (!construct (link, init_params)) goto construct_fail;return link;
drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c +3 -3
@@ -522,7 +522,7 @@ static uint8_t aux_read_edid_block( ddc->ddc_pin, &cmd); -if (false == result) +if (!result) dal_logger_write( ddc->ctx->logger, LOG_MAJOR_ERROR,
@@ -822,7 +822,7 @@ void dal_ddc_service_i2c_query_dp_dual_mode_adaptor("DP-DVI passive dongle %dMhz: " , DP_ADAPTOR_DVI_MAX_TMDS_CLK / 1000); }else { -if (is_valid_hdmi_signature == true) { +if (is_valid_hdmi_signature) { *dongle =DISPLAY_DONGLE_DP_HDMI_DONGLE ; CONN_DATA_DETECT(ddc->link, type2_dongle_buf,
@@ -845,7 +845,7 @@ void dal_ddc_service_i2c_query_dp_dual_mode_adaptor( } }else { -if (is_valid_hdmi_signature == true) { +if (is_valid_hdmi_signature) { *dongle =DISPLAY_DONGLE_DP_HDMI_DONGLE ; CONN_DATA_DETECT(ddc->link, type2_dongle_buf,
drivers/gpu/drm/amd/dal/dc/core/dc_stream.c +1 -1
@@ -161,7 +161,7 @@ struct dc_stream *dc_create_stream_for_sink(const struct dc_sink *dc_sink)if (NULL == stream) goto alloc_fail; -if (false ==construct (&stream->protected, dc_sink)) +if (!construct (&stream->protected, dc_sink)) goto construct_fail;dc_stream_retain (&stream->protected.public);
drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c +1 -1
@@ -1564,7 +1564,7 @@ static bool wait_for_reset_trigger_to_occur( tg->funcs->wait_for_state (tg,CRTC_STATE_VBLANK ); } -if (false == rc) +if (!rc)DC_ERROR ("GSL: Timeout on reset trigger!\n" );return rc;
drivers/gpu/drm/amd/dal/dc/dce110/dce110_link_encoder.c +1 -1
@@ -660,7 +660,7 @@ static void link_encoder_edp_wait_for_hpd_ready(dal_adapter_service_release_irq (as, hpd); -if (false == edp_hpd_high) { +if (!edp_hpd_high) { dal_logger_write(ctx->logger, LOG_MAJOR_ERROR, LOG_MINOR_HW_TRACE_RESUME_S3,
drivers/gpu/drm/amd/dal/dc/dce110/dce110_transform_bit_depth.c +3 -3
@@ -597,7 +597,7 @@ void dce110_transform_set_alpha(struct transform *xfm, bool enable) value =dm_read_reg (ctx, addr); -if (enable ==1 ) +if (enable) set_reg_field_value( value, 1,
@@ -798,7 +798,7 @@ bool dce110_transform_set_pixel_storage_depth(break ; } -if (ret == true) { +if (ret) {set_denormalization (xfm110, color_depth); ret =program_bit_depth_reduction (xfm110, color_depth, bit_depth_params);
@@ -936,7 +936,7 @@ bool dce110_transform_v_set_pixel_storage_depth(break ; } -if (ret == true) { +if (ret) {set_denormalization (xfm110, color_depth); ret =program_bit_depth_reduction (xfm110, color_depth, bit_depth_params);
drivers/gpu/drm/amd/dal/dc/dce80/dce80_transform_bit_depth.c +2 -2
@@ -588,7 +588,7 @@ void dce80_transform_enable_alpha( value =dm_read_reg (ctx, addr); -if (enable ==1 ) +if (enable) set_reg_field_value( value, 1,
@@ -791,7 +791,7 @@ bool dce80_transform_set_pixel_storage_depth(break ; } -if (ret == true) { +if (ret) {set_denormalization (xfm80, color_depth); ret =program_bit_depth_reduction (xfm80, color_depth);
drivers/gpu/drm/amd/dal/include/logger_interface.h +1 -1
@@ -128,7 +128,7 @@ const struct log_minor_info *dal_logger_enum_log_minor_info( { \static bool print_not_impl = true; \ \ -if (print_not_impl == true) { \ +if (print_not_impl) { \ print_not_impl = false; \dal_logger_write (ctx->logger,LOG_MAJOR_WARNING , \ log_minor, "DAL_NOT_IMPL: " fmt, ##__VA_ARGS__); \
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/9 amdgpu/dal: Use true/false over integers for boolean vars
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c | 2 +- drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c +1 -1
@@ -1188,7 +1188,7 @@ uint8_t dal_adapter_service_get_func_controllers_num(bool dal_adapter_service_is_feature_supported (enum adapter_feature_id feature_id) { -bool data =0 ; +bool data = false;dal_adapter_service_get_feature_value (feature_id, &data,sizeof (bool ));
drivers/gpu/drm/amd/dal/dc/calcs/bandwidth_calcs.c +4 -4
@@ -85,14 +85,14 @@ static void calculate_bandwidth(/* maximum_number_of_surfaces-1: d1 display_write_back420 chroma*/ /* underlay luma and chroma surface parameters from spreadsheet*/ if (mode_data->d0_underlay_mode == bw_def_none) { - d0_underlay_enable =0 ; + d0_underlay_enable = false; }else { - d0_underlay_enable =1 ; + d0_underlay_enable = true; }if (mode_data->d1_underlay_mode == bw_def_none) { - d1_underlay_enable =0 ; + d1_underlay_enable = false; }else { - d1_underlay_enable =1 ; + d1_underlay_enable = true; } results->number_of_underlay_surfaces = d0_underlay_enable + d1_underlay_enable;
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/9 amdgpu/dal: Drop spurious double ';' at the end of lines
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 10 +++++----- drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/gpio/gpio_service.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +5 -5
@@ -825,11 +825,11 @@ static void copy_crtc_timing_for_drm_display_mode( dst_mode->crtc_hsync_end = src_mode->crtc_hsync_end; dst_mode->crtc_htotal = src_mode->crtc_htotal; dst_mode->crtc_hskew = src_mode->crtc_hskew; - dst_mode->crtc_vblank_start = src_mode->crtc_vblank_start;; - dst_mode->crtc_vblank_end = src_mode->crtc_vblank_end;; - dst_mode->crtc_vsync_start = src_mode->crtc_vsync_start;; - dst_mode->crtc_vsync_end = src_mode->crtc_vsync_end;; - dst_mode->crtc_vtotal = src_mode->crtc_vtotal;; + dst_mode->crtc_vblank_start = src_mode->crtc_vblank_start; + dst_mode->crtc_vblank_end = src_mode->crtc_vblank_end; + dst_mode->crtc_vsync_start = src_mode->crtc_vsync_start; + dst_mode->crtc_vsync_end = src_mode->crtc_vsync_end; + dst_mode->crtc_vtotal = src_mode->crtc_vtotal; } static void decide_crtc_timing_for_drm_display_mode(
drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c +2 -2
@@ -2174,7 +2174,7 @@ enum bp_result dc_bios_get_din_connector_info(struct dc_bios *dcb, object =get_bios_object (bp, id);if (!object) { -BREAK_TO_DEBUGGER ();/* Invalid object id */ ; +BREAK_TO_DEBUGGER ();/* Invalid object id */ return BP_RESULT_BADINPUT ; }
@@ -3349,7 +3349,7 @@ static uint32_t get_support_mask_for_device_id(struct device_id device_id)break ;default :break ; - }; + }/* Unidentified device ID, return empty support mask. */ return 0 ;
drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.c +2 -2
@@ -1181,12 +1181,12 @@ static void destroy_3d_storage(dm_free (tables[indexof_table][indexof_row]); ++indexof_row; - }; + }dm_free (tables[indexof_table]); ++indexof_table; - }; + }dm_free (tables);
drivers/gpu/drm/amd/dal/dc/gpio/gpio_service.c +1 -1
@@ -140,7 +140,7 @@ failure_2:if (slot)dm_free (slot); - }; + } failure_1:dm_free (service);
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/9 amdkfd: Use the canonical form in branch predicates
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +++++----- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
@@ -109,7 +109,7 @@ static int kfd_open(struct inode *inode, struct file *filep) is_32bit_user_mode =in_compat_syscall (); -if (is_32bit_user_mode == true) { +if (is_32bit_user_mode) { dev_warn(kfd_device, "Process %d (32-bit) failed to open /dev/kfd\n" "32-bit processes are not supported by amdkfd\n",
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +5 -5
@@ -216,7 +216,7 @@ static int allocate_hqd(struct device_queue_manager *dqm, struct queue *q) } } -if (set == false) +if (!set)return -EBUSY ; pr_debug("kfd: DQM %s hqd slot - pipe (%d) queue(%d)\n",
@@ -354,7 +354,7 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)return -ENOMEM ; } -if (q->properties.is_active == true) +if (q->properties.is_active) prev_active = true;/*
@@ -363,9 +363,9 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)* and modify counter accordingly */ retval = mqd->update_mqd (mqd, q->mqd, &q->properties); -if ((q->properties.is_active == true) && (prev_active == false)) +if ((q->properties.is_active) && (!prev_active)) dqm->queue_count++; -else if ((q->properties.is_active == false) && (prev_active == true)) +else if ((!q->properties.is_active) && (prev_active)) dqm->queue_count--;if (sched_policy !=KFD_SCHED_POLICY_NO_HWS )
@@ -954,7 +954,7 @@ static int destroy_queues_cpsch(struct device_queue_manager *dqm,if (lock)mutex_lock (&dqm->lock); -if (dqm->active_runlist == false) +if (!dqm->active_runlist) goto out; pr_debug("kfd: Before destroying queues, sdma queue count is : %u\n",
drivers/gpu/drm/amd/amdkfd/kfd_events.c +2 -2
@@ -177,9 +177,9 @@ static bool allocate_event_notification_slot(struct file *devkfd,bool ret; ret =allocate_free_slot (p, page, signal_slot_index); -if (ret == false) { +if (!ret) { ret =allocate_signal_page (devkfd, p); -if (ret == true) +if (ret) ret =allocate_free_slot (p, page, signal_slot_index); }
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c +1 -1
@@ -300,7 +300,7 @@ struct kernel_queue *kernel_queue_init(struct kfd_dev *dev,break ; } -if (kq->ops.initialize (kq, dev, type,KFD_KERNEL_QUEUE_SIZE ) == false) { +if (!kq->ops.initialize (kq, dev, type,KFD_KERNEL_QUEUE_SIZE )) {pr_err ("amdkfd: failed to init kernel queue\n" );kfree (kq);return NULL ;
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +5 -5
@@ -98,7 +98,7 @@ static int pm_allocate_runlist_ib(struct packet_manager *pm,int retval;BUG_ON (!pm); -BUG_ON (pm->allocated == true); +BUG_ON (pm->allocated);BUG_ON (is_over_subscription ==NULL );pm_calc_rlib_size (pm, rl_buffer_size, is_over_subscription);
@@ -292,7 +292,7 @@ static int pm_create_map_queue(struct packet_manager *pm, uint32_t *buffer, q->properties.doorbell_off; packet->mes_map_queues_ordinals[0 ].bitfields3.is_static = - (use_static == true) ?1 :0 ; + (use_static) ?1 :0 ; packet->mes_map_queues_ordinals[0 ].mqd_addr_lo =lower_32_bits (q->gart_mqd_addr);
@@ -357,7 +357,7 @@ static int pm_create_runlist_ib(struct packet_manager *pm, alloc_size_bytes);list_for_each_entry (kq, &qpd->priv_queue_list, list) { -if (kq->queue->properties.is_active != true) +if (!kq->queue->properties.is_active)continue ; pr_debug("kfd: static_queue, mapping kernel q %d, is debug status %d\n",
@@ -383,7 +383,7 @@ static int pm_create_runlist_ib(struct packet_manager *pm, }list_for_each_entry (q, &qpd->queues_list, list) { -if (q->properties.is_active != true) +if (!q->properties.is_active)continue ; pr_debug("kfd: static_queue, mapping user queue %d, is debug status %d\n",
@@ -531,7 +531,7 @@ fail_create_runlist: fail_acquire_packet_buffer:mutex_unlock (&pm->lock); fail_create_runlist_ib: -if (pm->allocated == true) +if (pm->allocated)pm_release_ib (pm);return retval; }
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 8/9 amdkfd: Trim off unnescessary semicolon from kfd_packet_manager.c
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +1 -1
@@ -647,7 +647,7 @@ int pm_send_unmap_queue(struct packet_manager *pm, enum kfd_queue_type type,default :BUG ();break ; - }; + } pm->priv_queue->ops.submit_packet (pm->priv_queue);
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 9/9 amdkfd: Trim unnescessary intermediate err var in kfd_chardev.c
In reply to Edward O'Callaghan--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -2
@@ -131,12 +131,11 @@ static int kfd_ioctl_get_version(struct file *filep, struct kfd_process *p, void *data) {struct kfd_ioctl_get_version_args *args = data; -int err =0 ; args->major_version =KFD_IOCTL_MAJOR_VERSION ; args->minor_version =KFD_IOCTL_MINOR_VERSION ; -return err; +return 0 ; } static int set_queue_properties_from_user(struct queue_properties *q_properties,
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Edward O'Callaghan
The following series applies on top of the 'drm-next-4.7-wip-dal' branch. One patch has already been reviewed, however I have included it again here for completeness. The is the first of, I hope, further work from me in helping the mainlining of DAL and improving amdkfd compute to work out the box for us HPC folks. Please review.
Thanks for your time,
Quoted 14 lines
Edward O'Callaghan (9):
amdgpu/dal: Kill off stale dal directories amdgpu/dal: Kill off stub amdgpu_dm_*_dal_lock() symbols amdgpu/dal: Kill off stub dal_isr_*_lock() symbols amdgpu/dal: Use the canonical form in branch predicates amdgpu/dal: Use true/false over integers for boolean vars amdgpu/dal: Drop spurious double ';' at the end of lines
amdkfd: Use the canonical form in branch predicates
amdkfd: Trim off unnescessary semicolon from
amdkfd: Trim unnescessary intermediate err var in
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patches 7-9 applied to my -next tree.
Thanks!
Oded
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel